Search code examples
seleniumjunitautomationdata-driven-tests

Is there any way to know what is the result of each set of data in Junit and Selenium?


I'm trying to make tests with a different variation of data but with the same test case (JUnit, Selenium). I just want to know if there is any way to have the result of each set of data individually as if a set of data failed I want to know which one.


Solution

  • I have several test classes that run with the Paramerized test runner - org.junit.runners.Parameterized.Parameters. It works very nicely. Here is a good example: https://github.com/junit-team/junit4/wiki/parameterized-tests.

    You can specify a piece of the data to be included in the test name during execution. Good luck!