【问题标题】:If a step fails in a test case but test cases passes , extent report shows whole test case as failed even though final status of test case is passed如果测试用例中的某个步骤失败但测试用例通过,则即使测试用例的最终状态通过,extent 报告也会显示整个测试用例失败。
【发布时间】:2022-08-14 22:21:29
【问题描述】:

我将 DataProvider 用于我的测试用例,并且其中一个数据在测试用例中步骤失败但测试用例通过,testNG 将测试用例显示为通过但范围报告将其显示为失败。 Extent Report screenshot

    标签: selenium-webdriver extentreports selenium-extent-report


    【解决方案1】:

    在每个测试用例中提供reportStep("Sample Test", "pass");

    例如:

    @test
    public void verifylogin(){
    reportStep("UserName entered successfully", "pass");
    }
    
    @test
    public void verifylogin(){
    reportStep("Email entered successfully", "pass");
    }
    

    这样你就得到了这样的输出

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-25
      • 2019-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      相关资源
      最近更新 更多