I’m trying to come up with an efficient way to index my JUnit test, and hopefully come up with some automated way to do it.
Right now, I’ve got a JUnit Text fixture containing over 50 unit tests. I’m hoping that via an @After block or something, after each test, it can run something that prints to output kind of a “summary” of the test, specifying the unique parameters and such, and then ideally, I could take this output, and use it as an index for the testing suite.
The unique parameters would be things like, the name of the test function, the various input parameters for the test, and the expected/actual result, etc.
I’m not sure exactly how to accomplish this, but I’m sure I’m not the first person to want to try to do something like this, so I’m wondering if there is an existing or efficient way to do this.
Thanks in advance!
Setup your project with maven – than you will have all the results of your JUnit tests.
Have a look at Maven and its surefire plugin, how to customize the output.
Maven: http://maven.apache.org/
Surefire Plugin: http://maven.apache.org/plugins/maven-surefire-plugin/