I am using Junit 4.
I have many JUnit test cases. In GUI, of course, I know how to run it. And see the result. The trace information is written into a log file. Then I collect data in the excel.
Now I want above process totally automated. I want to write a main function, in this main function, I invoke selected test case, and trace information is recorded into log and I collect data and write to excel. I know how to collect data from log and then write to excel. But I am wondering how to invoke selected test cases in my main class. Does JUnit provide some API so that I could run test case easily instead of using reflection.