【问题标题】:TestNG. can't run a single test method测试NG。无法运行单个测试方法
【发布时间】:2014-02-18 11:02:59
【问题描述】:

我有 Selenium+Eclipse+Java Project+Eclipse TestNG 插件。 比如我的代码是:

public class TestClass {

@Test
public void test1() throws Exception {
    ...
    }

//@Test
public void test2() throws Exception {
    ...
    }

当我将 TestClass 作为 TestNG 运行时,两个测试都会执行。 我不明白为什么 test2 也被执行。 因为@Test注解前有注释“//”。

有什么想法吗? 提前致谢

【问题讨论】:

    标签: java eclipse testing selenium-webdriver


    【解决方案1】:

    首先,你应该清理类文件,然后再次编译项目

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-02
      • 1970-01-01
      • 2016-03-23
      • 2010-12-24
      • 1970-01-01
      • 2018-08-08
      相关资源
      最近更新 更多