码迷,mamicode.com
首页 > 编程语言 > 详细

java+testNG自动化框架搭建---------jekins默认生成测试报告

时间:2021-01-29 12:23:50      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:框架   build   dex   ref   art   cti   自动   val   common   

在pom.xml里引入listener模块  且jekines上无需配置构建后操作步骤,生成报告对应路径在workspace/job/target/surefire-reports/html/index.html

   <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/main/java</testSourceDirectory>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>7</source>
                    <target>7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <!-- <testNGArtifactName>org.testng:testng</testNGArtifactName>-->
                    <forkMode>once</forkMode>
                    <!--<skipTests>true</skipTests>-->

                    <skipTests>false</skipTests>
                    <suiteXmlFiles>
                        <suiteXmlFile>suites/test.xml</suiteXmlFile>
                    </suiteXmlFiles>
                        <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>
                        <forkMode>always</forkMode>
                </configuration>

            </plugin>
	    </plugins>
    </build>	

  

 

java+testNG自动化框架搭建---------jekins默认生成测试报告

标签:框架   build   dex   ref   art   cti   自动   val   common   

原文地址:https://www.cnblogs.com/jiangger/p/14343431.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!