X
xyzzy12
Is there a more dynamic way of setting up tests? We have legacy test
code that we are trying to convert to junit.
I think it is silly to be required to set up a "testFunc(...)" method
for each test.
We'd prefer:
abstract void runTests(Results x);
In your code you implement that and populate Results. If the runTests
blows up, the caller catches the exception and populates TestsResults
on the methods behalf. Easy, breezy, and would have worked just fine
with Java 1.18.
Right now we just have runAllTests, but that makes the junit report too
boring, we want to see each test. It will be too tedious to make a
separate method for each test.
code that we are trying to convert to junit.
I think it is silly to be required to set up a "testFunc(...)" method
for each test.
We'd prefer:
abstract void runTests(Results x);
In your code you implement that and populate Results. If the runTests
blows up, the caller catches the exception and populates TestsResults
on the methods behalf. Easy, breezy, and would have worked just fine
with Java 1.18.
Right now we just have runAllTests, but that makes the junit report too
boring, we want to see each test. It will be too tedious to make a
separate method for each test.