Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit 5? #43

Open
MartenBE opened this issue May 4, 2020 · 5 comments
Open

JUnit 5? #43

MartenBE opened this issue May 4, 2020 · 5 comments

Comments

@MartenBE
Copy link

MartenBE commented May 4, 2020

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

@thepieterdc
Copy link
Member

Which JUnit5 exclusive features would you like to use?

@MartenBE
Copy link
Author

MartenBE commented May 4, 2020

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?

@ninewise
Copy link

ninewise commented May 4, 2020

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
Copy link
Member

@MartenBE If you could send me an email ([email protected]), I can send you some examples using JUnit 4.

@MartenBE
Copy link
Author

MartenBE commented May 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants