无法生成黄瓜pdf报告

时间:2021-06-11 21:01:45

标签: report

我正在尝试生成 Cucumber PDF 报告。 我收到以下错误。 tech.grasshopper.pdf.PDFCucumberReport collectReportConfiguration 信息:未找到 PDF 报告配置。使用默认设置。

My extent.properties file:


extent.reporter.spark.start=true
extent.reporter.spark.out=test-output/SparkReport/Spark.html
extent.reporter.spark.config=src/test/resources/extent-config.xml

extent.reporter.spark.out=test-output/SparkReport/

screenshot.dir=test-output/
screenshot.rel.path=../
extent.reporter.pdf.start=true
extent.reporter.pdf.out=test output/PdfReport/ExtentPdf.pdf
#basefolder.name=reports
#basefolder.datetimepattern=d-MMM-YY HH-mm-ss
extent.reporter.spark.vieworder=dashboard,test,category,exception,author,device,log
systeminfo.os=WIndows
systeminfo.user=Su
systeminfo.build=1.1
systeminfo.AppName=AutomationPractice


I have also added extent-config.properties. And pom dependency:
<dependency>
            <groupId>tech.grasshopper</groupId>
            <artifactId>extentreports-cucumber6-adapter</artifactId>
            <version>2.6.0</version>
            <scope>test</scope>
        </dependency>

Please let me know how can I correct it.

1 个答案:

答案 0 :(得分:0)

Create extent-config.xml in resources folder with the below content



<?xml version="1.0" encoding="UTF-8"?>
<extentreports>
    <configuration>

        <!-- report theme -->
        <!-- STANDARD, DARK -->
        <theme>DARK</theme>

        <!-- document encoding -->
        <!-- defaults to UTF-8 -->
        <encoding>UTF-8</encoding>

        <!-- protocol for script and stylesheets -->
        <!-- defaults to https -->
        <!-- HTTP, HTTPS -->
        <protocol>HTTPS</protocol>

        <!-- offline report -->
        <timelineEnabled>true</timelineEnabled>

        <!-- offline report -->
        <enableOfflineMode>false</enableOfflineMode>

        <!-- use thumbnails for base64 images -->
        <!-- this may slowdown viewing tests -->`enter code here`
        <thumbnailForBase64>false</thumbnailForBase64>

        <!-- title of the document -->
        <documentTitle>FCPQ-DG Test Automation Extent Report</documentTitle>

        <!-- report name - displayed at top-nav -->
        <reportName>
            Test Automation Report
        </reportName>

        <!-- timestamp format -->
        <timeStampFormat>MMM dd, yyyy HH:mm:ss</timeStampFormat>

        <!-- custom javascript -->
        <scripts>
            <![CDATA[
        $(document).ready(function() {

        });
      ]]>
        </scripts>

        <!-- custom styles -->
        <styles>
            <![CDATA[

      ]]>
        </styles>
    </configuration>
</extentreports>