首页 > 解决方案 > 如何使用更新的类为 POM QA 自动化框架生成范围报告?

问题描述

我正在使用 C# 开发一个 QA 自动化框架。我想得到关于通过和失败的测试用例的报告。然后我认为范围报告最适合这个,我尝试了但范围报告类不起作用。请帮助我有正确的代码

标签: c#automationqa

解决方案


您需要在 POM.XML 中添加依赖项

<dependency>
  <groupId>com.aventstack</groupId>
  <artifactId>extentreports</artifactId>
  <version>3.1.5</version>
</dependency>

使用以下代码设置报告:

ExtentHtmlReporter report=new ExtentHtmlReporter(path);
extentReport=new ExtentReports();
extentReport.attachReporter(report);

推荐阅读