Open hornflip opened 1 month ago
This is due to the two different test engines (JUnit Jupiter and jqwik) and their lifecycle extension mechanisms. Normally, nothing would happen, but due to the parameter without extension registered (as Jupiter disregards the jqwik extension), you get this exception.
So everything is working as intended.
But of course, this does not solve the problem that the API is confusing here. Unfortunately, this cannot be solved without breaking the API, I think. We could try to merge both extensions and basically make them equivalent (confusing as well, but no unexpected or dangerous behavior). Alternatively, we could deprecate the jqwik support, this would be easy to notice in an IDE. I won't do that because I no longer actively maintain Ares due to a number of issues, maybe someone else is willing to take care of that?
But meanwhile, I simply recommend being careful.
Describe the bug We were testing with the IOTester and stumbled accross an odd error. Minimal working example Main Method:
Test Class:
This is how we run the IOTester. When we try to run it like shown in the Docs (with the parameter) we get an ParameterResolutionException:
So the Doc example does not work and to get it running via @ BeforeEach and @ AfterEach we have to adjust the import library for the @ Public Annotation from
de.tum.in.test.api.jupiter.Public
tode.tum.in.test.api.jqwik.Public
. Now it works but this is kinda weird to understand for people who have to write test cases and don't know about it.So what is the Issue here? Why do we get a java.lang.ExceptionInInitializerError thrown, when we use the jupiter package instead of jqwik?