The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

It looks like you're using Junit 5. If that's the case you can take advantage of the MethodSource annotation, which allows you to create a method that returns the values you want the tests to run with. In the example below Product is just a class that's storing my test data. @ParameterizedTest @MethodSource("populateValues") public void ...


0

You can testNg Data Provider to run parameterized tests. But if you want to stick with JUnit, you could use Junit DataProvider. Morever, you might need to find a way to use the dynamic data instead of specifying in the java code (like CSV,JSON,YAML etc)


Top 50 recent answers are included