java - Maven 中的 SOAPUI 测试报告

标签 java maven

我已将 SOAPUI 与 Maven 集成,以便我的测试用例可以使用 Maven 构建来执行。

效果很好。

但是此集成不会创建任何我可以引用以了解测试结果的格式化报告,例如 HTML 输出。

同样,我在 POM.XML 中添加了一个插件(如下所示)

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>2.6</version>
        </plugin>
    </plugins>
</reporting>

这会创建报告,但它会针对我的项目中的所有 junit 测试用例执行此操作。
我看不到任何有关 SOAPUI 测试用例的报告。

如何使 Surefire 报告包含 SoapUI 测试结果?

最佳答案

刚刚让它在我的设置中工作。

解决方案是“maven-surefire-report-plugin”将“TEST*.xml”转换为HTML格式,并将其放置在“/targets/surefire-report”中。因此请确保“soapui-maven-plugin”正在将“soapui-maven-plugin”的输出放在“/targets/surefire-report”目录中。

请参阅下面的示例

<plugin>
                <groupId>com.smartbear.soapui</groupId>
                <artifactId>soapui-maven-plugin</artifactId>
                <version>5.1.2</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals><goal>test</goal></goals>
                        <configuration>
                            <projectFile>${baseDirectory}/src/test/integration/resources/Mobile-Ads-soapui-project.xml</projectFile>
                            <iface>mobileAdsService</iface>
                            <outputFolder>${baseDirectory}/target/surefire-reports/</outputFolder>
                            <junitReport>true</junitReport>
                            <exportwAll>true</exportwAll>
                            <printReport>true</printReport>
                            <testFailIgnore>false</testFailIgnore>
                        </configuration>
                    </execution>
                </executions>
            </plugin> 

关于java - Maven 中的 SOAPUI 测试报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26798171/

相关文章:

java - 警告 : No mapping found for HTTP request with URI[] in DispatcherServlet with name []

java - 如何以编程方式从堆栈中删除 fragment ?

mysql - Maven 使用 java ee 应用程序运行 docker 镜像

Java 流 : difference between forEach and forEachOrdered

java - 使用 Java 中的注释制作自定义表单

maven - 将Maven资源转换为Gradle资源

java - Jmeter测试在GUI上运行但不在maven上运行

java - Maven + GWTTestCase + Test => 没有源代码可用于 nnn 类型(依赖项)

java - 为什么 Eclipse 给我 "groovy.lang.GroovyObject cannot be resolved"?

java - 组织.hibernate.QueryException : could not resolve property with column name already defined