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:
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.
test
文件夹中的类在构建后不包含在应用程序中,因此如果您想从主类运行PageTest
,请确保您的PageTest
类不在test
文件夹中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.