【发布时间】:2019-05-31 08:51:07
【问题描述】:
我有一个包含 2 个测试的 TestNG 套件,该套件包含在一个 XML 文件中。如果通过 IDE ( Eclipse ) 启动,测试套件工作得很好。但是,我确实需要通过命令提示符运行。我尝试使用以下命令启动它:
java -cp C:\eclipse\plugins\org.testng.eclipse_6.9.5.201505251947\lib\*;C:\myworkspace\myproject\bin org.testng.TestNG MyTestSuite.xml
发生的错误是:
[TestNGClassFinder] Warning: Can't link and determine methods of class tests.Test1
[[TestNGClassFinder]] Unable to read methods on class tests.MyTest1 - unable to resolve class reference org/openqa/selenium/WebDriver
[TestNGClassFinder] Warning: Can't link and determine methods of class tests.Test2
[[TestNGClassFinder]] Unable to read methods on class tests.MyTest2 - unable to resolve class reference org/openqa/selenium/WebDriver
TestNG 还会报告 0 次测试运行,其中 0 次失败和 0 次跳过(如果相关)。
【问题讨论】:
标签: java selenium selenium-webdriver testng command-prompt