1

I try to launch selenium test from main class and try to follow the example from next question: How do I run JUnit tests from inside my java application? :

JUnitCore junit = new JUnitCore();
Result result = junit.run(testClasses);

But I cannot use this resolve because I have not access to my test class from main class:

enter image description here


Queation: How to correctly run test class from main class?


PS

I need to run test class from main class since is necessary build executable jar file and launched the selenium test from it.

Valentyn Hruzytskyi
  • 1,772
  • 5
  • 27
  • 59

1 Answers1

1

classes in test folders are not included in application after build, so if you want to run PageTest from your main classes, make sure your PageTest class is not in test folder.

Hayk Melkonyan
  • 2,110
  • 4
  • 16
  • 22