I am writing several different selenium tests as page objects, and want to be able to run them from within a single, central class. I have figured out how to run one test from a different class, but when I try to run multiple tests, only a single one will complete.
I have tried running them sequentially with org.junit.runner.JUnitCore.main("com.etc"), but after testing the first class, the entire test ends. In the code:
org.junit.runner.JUnitCore.main("com.etc.test.HomePageCheck");
System.out.print("test");
the print command is never run, even if the test runs successfully
I have also tried creating multiple threads, but once any test completes, the whole process seems to end and leave the remaining tests hanging.
To reiterate, I have Class1 with several jUnit tests, and Class2 with other jUnit tests. I want to be able to run a Class3, whcih will run both Class1 and Class2 and complete all tests for those other classes. I do not think I want to use Selenium Grid, I would rather just run the tests locally on a machine, either in sequence or, preferably, in parallel.