kotest
kotest copied to clipboard
UniqueId Selectors Failing With Kotest
Which version of Kotest are you using 5.3.0
Hi there, I have had a kotest commit recently break the functionality of my application. Please see the error line below. I make a tool that performs load tests using the JUnit launcher. Some of the tests that may be run include kotest tests.
Caused by: java.lang.RuntimeException: Kotest does not allow running tests via uniqueId
Due to performance reasons, our application requires that the UniqueId be used from a JUnit TestPlan to cache discovery requests. This works exceptionally well for the Jupiter engine, but when the kotest engine is used we are seeing runtime exceptions appear. According to the JUnit team, all engines should support UniqueId.
I see that a decision was intentionally made recently to no longer support UniqueId selector when the engine is kotest.
https://github.com/kotest/kotest/pull/2862#issuecomment-1065919788
Specifically, I am seeing the following runtime exceptions.
To see an example of how I do test discovery see this comment on the JUnit issue board: https://github.com/junit-team/junit5/issues/2952#issuecomment-1165390154
Could kotest support running tests with UniqueId selectors? Mainly the tests being run are just kotest tests and are not mixed with JUnit. Ideally, when I provide UniqueId selectors I expect kotest to run only those tests (and not all the tests in a suite).
Thanks!
How are you getting the unique id to pass into the launcher for kotest tests?
The same way as outlined here: https://github.com/junit-team/junit5/issues/2952#issuecomment-1165390154
I just get the UniqueId from the test identifiers inside a TestPlan.
Thanks :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, just wondering if this work was done in the attached milestones. I still would really like this feature! Thanks :)
@oscargolding #3461 should fix this. Could you please try with a current snapshot?
Closing it as completed since the feature was implemented in #3461. If problems arise again let's open it as a bug :D