Open MartenBE opened 4 years ago
Which JUnit5 exclusive features would you like to use?
Currently, I have the following project:
domein/HashTabel.java
domein/Label.java
domein/ISleutel.java
domein/Getal.java
test/TestHashTabel.java
test/Label.java
The students need to fill in the domein/HashTabel.java
class to make the unit tests succeed. I've created this project so it works in Eclipse using junit 5 for the unit tests. Now when reading the readme from the judge, I understand a TestSuite.java
class is needed for the judge to work. Unfortunately, testsuites are not exactly supported in junit 5 according to https://stackoverflow.com/questions/50565724/are-test-suites-considered-deprecated-in-junit5 . Therefore, I was wondering if it would be possible to provide an example exercise using junit 5?
The current judge hooks into the junit runners as defined in junit 4 to report on the executed tests. Supporting junit 5 tests would require nontrivial changes to the judge code.
I can look into it, but the change won't come tomorrow. It's probably easier to use junit 4 tests for now, unless there are features missing in junit 4 you'd really need.
@MartenBE If you could send me an email (piedcler.declercq@ugent.be), I can send you some examples using JUnit 4.
Thank you very much for the quick responses! I've changed the unit tests from junit 4 to 5 and got it all working on Dodona.
The examples use the testsuite structure from junit 4. Is it possible to use junit 5 instead with this judge?