【问题标题】:@test annotation is there but in result no test is found@test 注释在那里,但结果没有找到测试
【发布时间】:2019-04-27 09:50:01
【问题描述】:

我的代码图片:

控制台错误

【问题讨论】:

标签: java selenium testng


【解决方案1】:

看起来您正在尝试运行一个 testng 套件而不是单个测试用例。 因此错误表明它来自 TestNG。

如果您只想运行一个带有测试的类,只需使用您的 IDE 对该类执行运行选项即可。

如果你想用 testng 运行整个测试套件,你需要配置你的 testng.xml 文件来包含你所有的类或测试方法。 F.e:

<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite example suite 1" >
  <test name="Test name example" >
    <classes>
      <class name="mainPage.For_LM"/>
    </classes>
 </test>
</suite>

【讨论】:

    猜你喜欢
    • 2022-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-02
    • 1970-01-01
    • 2014-12-24
    • 2017-10-30
    相关资源
    最近更新 更多