java-sdk-contrib icon indicating copy to clipboard operation
java-sdk-contrib copied to clipboard

[Junit5 extension] Run test multiple times for the same flag with different values

Open aepfli opened this issue 5 months ago • 7 comments

Sometimes, you want to ensure that your code behaves the same way for all code paths, even if different feature flags are involved.

Junit5 has parameterized tests to run multiple tests based on a source. This approach is not feasible for us, as it only generates an array of possible argument sets.

We need to find a way (maybe with our annotation) to create such tests. The cartesian test extension of JUnit Pioneer can be an inspiration for this https://github.com/junit-pioneer/junit-pioneer/blob/main/src/main/java/org/junitpioneer/jupiter/cartesian/CartesianTest.java

aepfli avatar Sep 19 '24 11:09 aepfli