I am using IntelliJ IDEA for learning automation testing with Selenium
and have write 3/4 maven tests in my TestSuite using TestNG
annotations.
Now on Run/Debug
Config in VM option
If I use command
-Dbrowser="chrome"
run the test suite, it works fine.
But when I need to run a specific test I try giving the command
-Dtest=TestSuit#testname
to test and run but it gives an erro as
Error: Could not find or load main class test.
I have already tried deleting target folder and run again. Also, java path is already set correctly.
This one is extremely wierd, i added -DrunSequence=false and I got this very same error, made no sense, removed the -Xms1024m -Xmx2048m, instead put -Dmyproperty=myproperty...suddenly no error, put back the -Xms1024m -Xmx2048m options and change the -D option back to the original and now everything is working, why was it not working earlier and complaining with Could not load main class...is one of the things that will never go explained. Cheers, Vipin.
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.