idea+maven 如何导入reportng报告

 

1、在pom中加入依赖

<
   <dependency>

                    <groupId>org.uncommons</groupId>

                    <artifactId>reportng</artifactId>

                    <version>1.1.4</version>

                    <scope>test</scope>

                    <exclusions>

                        <exclusion>

                            <groupId>org.testng</groupId>

                            <artifactId>testng</artifactId>

                        </exclusion>

                    </exclusions>

                </dependency>

                <!-- https://mvnrepository.com/artifact/com.google.inject/guice -->

                <dependency>

                    <groupId>com.google.inject</groupId>

                    <artifactId>guice</artifactId>

                    <version>4.0</version>

                    <scope>test</scope>

                </dependency>

  <plugin>

            <groupId>org.apache.maven.plugins</groupId>

            <artifactId>maven-surefire-plugin</artifactId>

            <version>2.19.1</version>

            <configuration>

                <properties>

                    <property>

                        <name>usedefaultlisteners</name>

                        <value>false</value>

                    </property>

                    <property>

                        <name>listener</name>

                        <value>org.uncommons.reportng.HTMLReporter,

                            org.uncommons.reportng.JUnitXMLReporter</value>

                    </property>

                </properties>

                <workingDirectory>target/</workingDirectory>

            </configuration>

        </plugin>

2、然后设置默认的监听器

 

 

3、点击运行,即可

 

posted @ 2017-08-04 17:08  飞教主  阅读(558)  评论(0编辑  收藏  举报