Today a new library for writing parameterised tests has been released. JUnitParams lets you write parameterised tests together with your other JUnit tests. There's quite a few differences to the classical JUnit approach (Prameterized, Theories runners):
- more explicit - params are in test method params, not class fields
- less code - you don't need a constructor to set up parameters
- you can mix parameterised with non-parameterised methods in one class, and have many methods with different parameter sets in the same test class
- params can be passed as a CSV string, from a parameters provider class, or a normal method within your test class (no java syntactic clutter)
- parameters provider class can have as many methods as you want, so that you can group different cases
- you can see actual parameter values in your IDE
For a more detailed description see the project site.
Have fun!