[英]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
I am using DataProvider for my test cases, and with one of the data a step fails in test case but test case passes, testNG shows the test case as passed but extent report show it as failed.我正在为我的测试用例使用 DataProvider,并且其中一个数据在测试用例中步骤失败但测试用例通过,testNG 显示测试用例通过但范围报告显示它失败。 Extent Report screenshot
范围报告屏幕截图
To provide the reportStep("Sample Test", "pass");提供reportStep("Sample Test", "pass"); in each testcase.
在每个测试用例中。
eg:例如:
@test
public void verifylogin(){
reportStep("UserName entered successfully", "pass");
}
@test
public void verifylogin(){
reportStep("Email entered successfully", "pass");
}
So that you got the output like this enter image description here这样您就可以得到像这样的 output在此处输入图像描述
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.