TestNG将多个HTML TestNG报告合并为一个TestNG报告

我正在多个节点中运行Maven项目的TestNG套件。 我正在使用HTMLReporter生成TestNG运行结果报告。 运行完成后,每个节点都会生成一个HTML报告。

运行结束后需要获得合并结果报告的要求。 我们需要将所有测试结果合并为一个TestNG结果。

有没有办法做到这一点?

shinyzhuzhu 回答:TestNG将多个HTML TestNG报告合并为一个TestNG报告

我有类似的要求。我做到了。

所有测试类都将扩展BaseTest。

Class BaseTest{

            public static ExtentReports extent =new ExtentReports();//initiating here is very important
            public static ExtentHtmlReporter htmlReporter;

    @BeforeSuite
        public void beforeSuiteSetup() {
            String filepath = System.getProperty("user.dir");
            htmlReporter = new ExtentHtmlReporter(filepath+"/Report.html");     
            extent.attachReporter(htmlReporter);
        }

    @AfterSuite(alwaysRun = true)
        public void afterSuite() {
            extent.flush();
        }

    }
本文链接:https://www.f2er.com/3161450.html

大家都在问