Java 如何获取html格式的Maven报告?
我有一个带有eclipse的maven项目和一些selenium测试。 我可以在命令行中运行它们,并在目标文件夹中以txt和xml格式获得报告 但是我想要html格式的报告。 我应该在POM文件中添加什么 多谢各位 这是我的POM.xmlJava 如何获取html格式的Maven报告?,java,maven,Java,Maven,我有一个带有eclipse的maven项目和一些selenium测试。 我可以在命令行中运行它们,并在目标文件夹中以txt和xml格式获得报告 但是我想要html格式的报告。 我应该在POM文件中添加什么 多谢各位 这是我的POM.xml .... <dependencies> <dependency> <groupId>junit</groupId> <artifactId&g
....
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.44.0</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.3</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
。。。。
朱尼特
朱尼特
4.11
测试
org.seleniumhq.selenium
硒爪哇
2.44.0
com.itextpdf
itextpdf
5.5.3
com.oracle
ojdbc6
11.2.0
javax.mail
邮件
1.4.3
org.apache.maven.plugins
maven编译器插件
2.3.2
1.6
1.6
org.apache.maven.plugins
maven依赖插件
2.4
复制
包裹
UTF-8
请参见,正如第二个答案所指出的,您应该能够使用Maven
Surefire报告插件解析${basedir}/target/Surefire报告下生成的TEST-*.xml文件,并使用DOXIA呈现这些文件,DOXIA将创建测试结果的web界面版本
以下是配置它的XML:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18</version>
</plugin>
</plugins>
</reporting>
org.apache.maven.plugins
maven surefire报告插件
2.18
以下任一命令将调用它:
mvn站点
mvn surefire报告:报告