Better parameterised tests in JUnit


News: Better parameterised tests in JUnit

  1. Better parameterised tests in JUnit (3 messages)

    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!

  2. Thanks, but no thanks.

  3. Better parameterised tests in JUnit[ Go to top ]

    Thanks, but no thanks.

    but whyyy?

  4. A.B.I ( A Bad Idea)[ Go to top ]

    So god help us!