Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing latest article 24
Browse Latest Browse All 98893

Create a batch file to invoke testng.xml to run selenium scripts

$
0
0

I need help to create a .bat file to invoke testng.xml which has all the tests to run.According to this link, I created the .bat file. Here is what I have written in it:

java -cp "C:\Program Files\Selenium Execution Engine\lib\library\testng-5.8-jdk15.jar";"C:\POM_Newdemo\EF_Progression\bin\testscripts" org.testng.TestNG "C:\POM_Newdemo\EF_Progression\testng.xml"

where:

  • -cp : is class path
  • C:\Program Files\Selenium Execution Engine\lib\library\testng-5.8-jdk15.jar : is the path of my testng jar file
  • C:\POM_Newdemo\EF_Progression\bin\testscripts : is the path of my .class files of my tests
  • C:\POM_Newdemo\EF_Progression\testng.xml : is the path of my testng.xml file

It is throwing error as follows:

[Parser] Running:  C:\POM_Newdemo\EF_Progression\testng.xmlSuiteTotal tests run: 0, Failures: 0, Skips: 0[ERROR]:Cannot find class in classpath: testscripts.Test_Demo

Please let me know how to resolve this error.


Viewing latest article 24
Browse Latest Browse All 98893

Trending Articles