dodona-edu / judge-java

JUnit-based Java judge for the Dodona learning environment
MIT License
1 stars 1 forks source link

JUnit 5? #43

Open MartenBE opened 4 years ago

MartenBE commented 4 years ago

The examples use the testsuite structure from junit 4. Is it possible to use junit 5 instead with this judge?

thepieterdc commented 4 years ago

Which JUnit5 exclusive features would you like to use?

MartenBE commented 4 years ago

Currently, I have the following project:

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?

ninewise commented 4 years ago

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.

thepieterdc commented 4 years ago

@MartenBE If you could send me an email (piedcler.declercq@ugent.be), I can send you some examples using JUnit 4.

MartenBE commented 4 years ago

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.