【问题标题】:How to know test is skipped due to failed configuration or skipped configuration如何知道由于配置失败或跳过配置而跳过测试
【发布时间】:2014-01-08 13:24:06
【问题描述】:

我怎么知道我的测试由于失败/跳过的配置错误而被跳过。 我正在尝试从“ITestResult testResult”获取“SuiteListener”中的信息

在当前版本的 TestNg 中,如果我的测试由于配置错误而被跳过,当我尝试抛出我的测试时,它显示为 null;

testResult.getThrowable()

【问题讨论】:

    标签: testng


    【解决方案1】:

    您可以使用result.getMethod().isTestMethod()检查是测试方法失败还是配置错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-19
      • 2023-01-22
      • 1970-01-01
      • 1970-01-01
      • 2012-02-13
      • 1970-01-01
      相关资源
      最近更新 更多