nus-cs2103-AY2021S1 / forum

20 stars 2 forks source link

How to do assertion task in tp #349

Closed XIA-LIYI closed 4 years ago

XIA-LIYI commented 4 years ago

Hi guys, Anyone knows the instruction for that assertion task? I add one assert into code but it does not become green. So I feel confused.

Thanks for any help given!

yongmingyang commented 4 years ago

Hi! I'm not sure if I understand your question correctly. But if it is the case where your assert failing does not give an error message, it may be due to your JVM options. Here's the link that I used to rectify mine: https://stackoverflow.com/questions/48396274/how-to-enable-assertions-in-the-gradle-run-task

XIA-LIYI commented 4 years ago

Hi, I mean why in tp dashboard, it does not show asserts found in my code base.

XIA-LIYI commented 4 years ago

I have already put assert in my code and merge into master branch.

damithc commented 4 years ago

@XIA-LIYI First, check if those assert statements are attributed to you in the tp code dashboard (i.e., the RepoSense report). If they are, the item should turn green in the next tp progress dashboard update.

XIA-LIYI commented 4 years ago

@damithc Hi prof. RepoSense failed to detect my commits after 13 Oct.

XIA-LIYI commented 4 years ago
image image

In tp progress, it detects those commits but RepoSense failed to do so. How can I solve these issues?

damithc commented 4 years ago

Let me know the Author name of those commits . It's likely that you are using a new author name not known to RepoSense.

damithc commented 4 years ago

BTW, you can use the git -log command or SourceTree to find the author name of a commit.

XIA-LIYI commented 4 years ago

Yes, I am using a new device. So if I configure again in local device, will it be detected?

Attached is author name of current device.

image
XIA-LIYI commented 4 years ago

Or I need to write an assertion after configuring and push again?

damithc commented 4 years ago

Let me know which author name was used for those missing commits. I can add that to the RepoSense config, after which those assertions will be detected.

XIA-LIYI commented 4 years ago

It should be SimonXIA0316.

XIA-LIYI commented 4 years ago

So commits written by SimonXIA0316 in the future can be detected right?

damithc commented 4 years ago

So commits written by SimonXIA0316 in the future can be detected right?

Yes, both past and future commits by that author will be detected as yours.

XIA-LIYI commented 4 years ago

Okie, thanks prof!

XIA-LIYI commented 4 years ago

BTW, when can I see the update info on RepoSense report?

damithc commented 4 years ago

It's updated every 24 hours. It can take another 24 hours for the assertion detection to propagate from the reposense dashboard to the tp progress dashboard.

XIA-LIYI commented 4 years ago

Okay thanks prof!

XIA-LIYI commented 4 years ago

Hi prof, @damithc I wrote the assertions on 21 Oct, but the tab of assertions is still red although it can be detected in RepoSense.

image

Also for overdue task, if I do it now, will it be green again?

damithc commented 4 years ago

It should turn green in the next update.

XIA-LIYI commented 4 years ago

Prof, you mean which question? The assertion tab?

damithc commented 4 years ago

Prof, you mean which question? The assertion tab?

Yes, the Assertions item.

Also for overdue task, if I do it now, will it be green again?

Yes, as long as you do them within a few days after the deadline.

XIA-LIYI commented 4 years ago

Okay thanks for reply!