Liked TestNG DataProviders but have to use JUnit?
This is an example how to use TestNG like DataProviders in JUnit.
JUnit DataProviders Maven dependency
DataProvider in JUnit tests
First of all you need to annotate your test class with
Then create DataProvider
To use that data provider you should annotate you test with
JUnit DataProvider example
… but why doesn’t JUnit support it from the box?
Want to use DataProviders with JUnit and Spring? This is another pain…
You may also find these posts interesting: