Getting error Could not find or load main class org.testng.TestNG

后端 未结 6 1088
不思量自难忘°
不思量自难忘° 2020-12-03 15:35

I\'m trying to run TestNG from command line, but it\'s giving me error. Can someone tell me where am I going wrong?

java -cp C:/TestNG directory

6条回答
  •  一生所求
    2020-12-03 16:12

    1. Copy the below commands in a text file.

    2. Edit the location.

    3. Save it as yourtext.bat

    4. Now, double click on the batch file created.

    cd C:\Workspace\projectname

    java -cp C:\Workspace\projectname\lib*;C:\Workspace\projectname\bin org.testng.TestNG testng.xml

提交回复
热议问题