簡體   English   中英

如何生成junit測試結果的pdf報告?

[英]How to generate pdf report of junit test results?

I have a maven project and want to generate pdf report of my junit test results. I used Surefire and pdf plug-in as well. 
my pom looks like 
/*<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                    </archive>                  <outputDirectory>D:\backups\third\aristocrat_template_project\game-jars\queenOfTheNile_html</outputDirectory>
                </configuration>
            </plugin>         
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
            </plugin>        
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pdf-plugin</artifactId>
                <version>1.3</version>
                <executions>
                    <execution>
                        <id>pdf</id>
                        <phase>site</phase>
                        <goals>
                            <goal>pdf</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>  
</build>

* /
在我的目標站點文件夾中,生成了html文件,但不包含與junit結果相關的報告。 我還在target-> pdf文件夾下得到了一個pdf文件,但是它不包含與項目或junit結果有關的任何信息。 謝謝 !

您可以使用以下方法: 如何使用Maven PDF插件從Surefire Report生成PDF?
您可以使用任何(至少我所知道的)測試覆蓋率工具(例如cobertura,jacoco),並且會生成Raports本身。
您也可以使用黃瓜測試框架來生成非常友好的報告,但這是創建黃瓜測試的一項艱巨的工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM