Jenkins 使用bat文件运行TestNG时出错
为什么会出现此错误: 错误:无法找到或加载主类org.testng.testngJenkins 使用bat文件运行TestNG时出错,jenkins,selenium-webdriver,testng,Jenkins,Selenium Webdriver,Testng,为什么会出现此错误: 错误:无法找到或加载主类org.testng.testng 使用bat文件运行TestNG时发生?您必须使用-cp参数向TestNGjar提供classpath。也适用于其他依赖JAR,如selenium和测试类(项目) 请尝试以下命令: java -cp J:\temp\testng\*;J:\temp\workspace\TestNGExamples\bin;J:\automation\* org.testng.TestNG J:\temp\workspace\Test
使用bat文件运行TestNG时发生?您必须使用
-cp
参数向TestNG
jar提供classpath
。也适用于其他依赖JAR,如selenium和测试类(项目)
请尝试以下命令:
java -cp J:\temp\testng\*;J:\temp\workspace\TestNGExamples\bin;J:\automation\* org.testng.TestNG J:\temp\workspace\TestNGExamples\testng1.xml
注意:请根据您的计算机更新路径
对于-cp
参数,给定
你从哪里得到这个错误?你想测试什么?如何测试?请提供更多信息以帮助您。可能的副本