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

后端 未结 6 1083
不思量自难忘°
不思量自难忘° 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:14

    Possibly your testng.jar file is not in the lib folder that C:\Workspace\projectname\lib.

    You should find testng.jar first in your computer and move it manually to C:\Workspace\projectname\lib. Then it will work

提交回复
热议问题