kit-sdq / intelligrade

IntelliJ-Plugin for grading with the artemis project
Eclipse Public License 2.0
8 stars 2 forks source link

TestResults are displayed as failed if they don't give points (even if they were successful) #60

Closed Luro02 closed 1 month ago

Luro02 commented 1 month ago

This is the code that is responsible: https://github.com/kit-sdq/intelligrade/blob/b2f0eb86225f9513c0b136273c1c58807b924a96/src/main/java/edu/kit/kastel/sdq/intelligrade/extensions/guis/TestCasePanel.java#L31-L33

We have tests that are mandatory, and therefore do not give points. These will always be displayed as failed, which is wrong.

Instead, use the getPositive() to figure out if they were successful:

var icon = result.getPositive().map(v -> v ? AllIcons.RunConfigurations.TestPassed : AllIcons.RunConfigurations.TestFailed).orElse(AllIcons.RunConfigurations.TestUnknown);

There seem to be cases where the field is not present, for these I am not sure if they should be considered as a failed test or not. That is why I would add a TestUnknown icon with maybe a ? on a gray background?