C# 使用c在Specflow中生成Selenium报告#

C# 使用c在Specflow中生成Selenium报告#,c#,extentreports,C#,Extentreports,我已经为数据块报告生成创建了一个代码,我在本文中提到过。代码运行良好,但我怀疑: [BeforeTestRun] public static void initializwHtmlReport() { string name = DateTime.Now.ToString("HHMMss"); var htmlreporter = new ExtentHtmlReporter(@"C:\Users\ffaiyazf\Downloa

我已经为数据块报告生成创建了一个代码,我在本文中提到过。代码运行良好,但我怀疑:

    [BeforeTestRun]
    public static void initializwHtmlReport()
        {

        string name = DateTime.Now.ToString("HHMMss");
        var htmlreporter = new ExtentHtmlReporter(@"C:\Users\ffaiyazf\Downloads\Selenium-Webdriver (1)\TestResults\"+ name +".html");
        htmlreporter.Config.Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Standard;
        extent = new ExtentReports();
        extent.AttachReporter(htmlreporter);

        }

        [AfterTestRun]
        public static void teardownreport()
        {
            extent.Flush();
        }
它创建了两个名为index.html和dashboard.html的文件。如果您再次看到代码,我没有提到名称
索引
仪表板
如何以我自己的名称生成报告。你能帮我解决这个问题吗

我还附上了这张照片。我的代码中没有提到这些名字,但它显示了这些名字

您看到的是版本4的新默认Html reporter。这默认为4个模板:index.html、dashboard.html、tag.html和exception.html。因为每个视图都被分解为自己的文件,所以我们可以确保整体响应性比版本3好得多。如果要使用旧的reporter,请使用ExtentV3HtmlReporter

发件人:


也就是说,您可以降级到NuGet软件包的第3版,以避免默认的HTML视图文件命名。

@faiyaz f请在我的答案上标记V,因为我认为这有助于解决您的问题。