[TestNG]无法运行硒测试。
这是我的testng.xml
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Suite1" verbose="1" >
<test name="Regression1" >
<packages>
<package name="com.example.tests" />
</packages>
</test>
</suite>
当我运行run_testNG ant任务时,我正在
Buildfile: build.xml
prepare:
compile:
run_test:
[waitfor] Wait for proxy server launch
start-server:
run_testNG:
[testng] [TestNG] Running:
[testng] /softwares/cruisecontrol-bin-2.8.3/run_test/testng.xml
[testng]
[testng]
[testng] ===============================================
[testng] Suite1
[testng] Total tests run: 0, Failures: 0, Skips: 0
[testng] ===============================================
[testng]
stop-server:
[selenium-shutdown] Getting: http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
[selenium-shutdown] To: /softwares/cruisecontrol-bin-2.8.3/run_test/result.txt
[selenium-shutdown] DGF Errors during shutdown are expected
BUILD SUCCESSFUL
Total time: 1 second
它没有运行任何测试。请让我知道可能是什么问题。如果您愿意,我也可以共享我的build.xml。
答案 0 :(得分:1)
可能是由于多种原因: 1.您的代码可能没有@Test注释的方法 2.包名可能有误