In the process of running tests for an operation that involves the processing of an image, I want to have a parameterized test that loads an image and generates a new one. If that operation is successful (this "test" is written mainly to catch any exceptional issues), then I want to individually test different aspects of the result separately (e.g. component count, bit depth etc.) and those tests should succeed/fail independently.
Back in the days of JUnit 4, there were parameterized test classes that would do this. These are not available JUnit 5 :(
I suspect I could use nested tests, test instance lifecycle adjustments and/or custom ordering, but my experiments have so far failed. All tests always runs separately from all others. Only the report is different, in that it has a format describing a hierarchy.
Any suggestions, or should I just wait for parameterized containers and container templates?
Notes:
- Obviously I shouldn't have to run the operation all over again for each of the sub-tests because it is already very resource-consuming.
- Another thing is that I also need to control tests at the level of the initial operation by using "assumptions" to weed out cases that are to be ignored (e.g. unsupported source image types). That makes the top-level "setup" test control the sub-tests as well.