Maven:Soap测试用例的JUnitHTML报告

Maven:Soap测试用例的JUnitHTML报告,maven,soap,ant,soapui,Maven,Soap,Ant,Soapui,下面是我的Ant构建工具,它可以很好地生成HTML报告 <?xml version="1.0"?> <project name="SoapTest" default="testreport" basedir="."> <target name="soapui"> <exec dir="." executable="C:/Program Files/SmartBear/SoapUI-5.2.0/bin/te

下面是我的Ant构建工具,它可以很好地生成HTML报告

 <?xml version="1.0"?>
       <project name="SoapTest" default="testreport" basedir=".">
          <target name="soapui">
       <exec dir="." executable="C:/Program Files/SmartBear/SoapUI-5.2.0/bin/testrunner.bat">
       <arg line="-j -f 'C:/soapreports' 'C:/SoapUI/APRS_SoapUI_Project.xml'"/>
       </exec>
       </target>
          <target name="testreport" depends="soapui">
          <junitreport todir="C:/soapreports">
          <fileset dir="C:/soapreports">
          <include name="TEST-*.xml"/>
          </fileset>
          <report todir="C:/soapreports/HTML" styledir="C:/Program Files/apache-ant-1.9.6/etc" format="noframes">
          </report>
          </junitreport>
       </target>   
    </project>

您可以使用以下pom.xml配置从Maven运行SoapUI项目并获取JUnit报告。借鉴

<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.soapui.tests</groupId>
    <artifactId>SoapUI_Maven</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <properties>
        <soapui.plugin.version>
            5.1.2
        </soapui.plugin.version>
    </properties>
    <pluginRepositories>
        <pluginRepository>
            <id>smartbear-sweden-plugin-repository</id>
            <url>http://smartbearsoftware.com/repository/maven2/</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <groupId>com.smartbear.soapui</groupId>
                <artifactId>soapui-pro-maven-plugin</artifactId>
                <version>${soapui.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.reflections</groupId>
                        <artifactId>reflections</artifactId>
                        <version>0.9.10</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <settingsFile>${basedir}/src/config/soapui-settings.xml</settingsFile>
                    <junitReport>true</junitReport>
                    <printReport>true</printReport>
                    <coverage>${project.build.directory}/reports</coverage>
                </configuration>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <testFailIgnore>true</testFailIgnore>
                            <outputFolder>${project.build.directory}/reports</outputFolder>
                            <projectFile>"Your SoapUI project full path"</projectFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

4.0.0
com.soapui.tests
索皮尤·马文
0.0.1-快照
5.1.2
smartbear瑞典插件库
http://smartbearsoftware.com/repository/maven2/
com.smartbear.soapui
soapui pro maven插件
${soapui.plugin.version}
组织反思
反思
0.9.10
${basedir}/src/config/soapui-settings.xml
真的
真的
${project.build.directory}/reports
集成测试
测试
真的
${project.build.directory}/reports
“您的SoapUI项目完整路径”

您是否尝试过该文档?