【问题标题】:is not able to run the selenium tests无法运行硒测试
【发布时间】:2011-04-28 12:46:22
【问题描述】:

[TestNG] 无法运行 selenium 测试。

这是我的 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。

【问题讨论】:

  • 你真的有一个名为 com.example.tests 的包吗?如果你这样做,请发布一个在其中找到的测试类。

标签: selenium testng


【解决方案1】:

可能有多种原因: 1. 你的代码可能没有带有@Test 注解的方法 2. 包名可能有误

【讨论】:

    猜你喜欢
    • 2019-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-24
    • 2013-06-30
    • 2020-01-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多