gpt4 book ai didi

java - 如何使用eclipse生成surefire-report.html

转载 作者:行者123 更新时间:2023-12-01 10:16:28 29 4
gpt4 key购买 nike

我想知道如何使用eclipse生成surefire-report.html。我创建了一个项目,并且能够在文本文件中创建报告

这是我的 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company</groupId>
<artifactId>mymaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mymaven</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-control</artifactId>
<version>1.0.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.5</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputName>GoogleSearchTestResults</outputName>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

如果您能提供帮助,我们将不胜感激。

谢谢

最佳答案

包含此报告插件

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

执行目标 -

test -Dmaven.test.failure.ignore=true site

关于java - 如何使用eclipse生成surefire-report.html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35862114/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com