I don't have much experience with Java. I am trying to write a java program which takes a *.java or .class, run the test cases and report back number of failed test cases and number of passed test cases.
I was looking at different options available to me. How do I run JUnit tests from inside my java application?
This question explains how to run a single test case from within java program, but i am not really able to come up with a way to run multiple implementations (multiple .java files having same functions). Initial thought was to store them in different dir and walk through the directory and execute it.
The other thought was to somehow use the class path property to run multiple java implementations. I really have not looked at how to pass this path as a argument to the run function. I am still exploring.
It would be of great help if someone can suggest a better way of doing this. Or any suggestions regarding my thoughts here.
Thanks