Re: Parameterized Tests (was Re: ant git commit: Inline buildfile names, make search easier)
I've started using JUnit 5 in a personal project and found that it has a
lot more useful features for test parameters. For instance, they now
support parameterized test methods instead of just the class itself. There
are also more convenient ways of injecting test data through annotations
and such. Plus, JUnit 5 still supports v3 and v4 tests, so it's not a mass
migration effort, either.
On 3 May 2018 at 08:10, Gintautas Grigelionis <g.grigelionis@xxxxxxxxx>
> 2018-05-03 11:06 GMT+02:00 Stefan Bodewig <bodewig@xxxxxxxxxx>:
> > I'm still not sure I understand which benefit you see by retrofitting
> > tests that have been written before @Parameterized was invented. They do
> > contain way too many asserts in a single test method, but all of them
> > pass, so this is somewhat moot as long as neither the test nor the code
> > under test is touched :-).
> The benefit is clarity of what is being tested. This perhaps pertains even
> more to extraction of fixtures which lead to splitting up of test cases.
> Regarding @Parameterized, it is said that it's easier to understand complex
> data than complex code.
> It's also easier to add new test cases should the need arise, less chance
> of missed annotation or copy-pasting a target name.
> Call it code churning, but churning actually separates butter from
> buttermilk :-)
Matt Sicker <boards@xxxxxxxxx>