SERG-Delft / andy

Andy assesses student's test code. It's used in CSE1110, TU Delft.
MIT License
78 stars 22 forks source link

Exam mode configuration always enables Pitest and JaCoCo #244

Closed martinmladenov closed 6 months ago

martinmladenov commented 1 year ago

PR #217 introduced an exam mode security guard which creates a copy of the configuration and discards the original one in order to prevent students from leaking meta tests or code checks during exams (in case the teacher forgets to remove them). This new configuration is supposed to be the same as the original, with the exception of meta tests and code checks. However, the current one has a bug: the skipJacoco and skipPitest methods aren't overridden, so they always return false, causing Pitest and JaCoCo to always be enabled during exams.

alexcojocaru2002 commented 1 year ago

I can maybe work on this one ? @martinmladenov

martinmladenov commented 1 year ago

Sure, I'll assign you

alexcojocaru2002 commented 1 year ago

@martinmladenov I don't exactly understand one thing : in the security guard, the skipJacoco / skipPitest methods should be overriden and return a certain value or their behavior should be inherited from somewhere else ?

martinmladenov commented 1 year ago

@alexcojocaru2002 Their behaviour should be inherited from the original run configuration, like with most other methods in the exam mode run configuration.

alexcojocaru2002 commented 1 year ago

@alexcojocaru2002 Their behaviour should be inherited from the original run configuration, like with most other methods in the exam mode run configuration.

So just taking the return value from the skipJacoco / skipPitest methods from the RunConfiguration and overriding the methods ?

martinmladenov commented 1 year ago

@alexcojocaru2002 Yes, exactly. It should be done in essentially the same way as everything else in that class.