EugeneL
7 years agoNew Contributor
Is it possible to generate Test Result Report using SOAP UI maven plugin?
I created SOAP UI test suite which could be executed from the command line via SOAP UI Maven plugin. The only thing it lacks is a Test Report. Could you tell me, how should I fix my pom.xml to generate Test Report (preferably in JUnit format)? Please, find my pom.xmlbelow.
SOAP UI version: 5.4.0 Open Source
pom.xml:
Spoiler
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme.rest-service.test</groupId>
<artifactId>rest-service</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>SOAP UI Sanity Test Suite For RESR Service</name>
<properties>
<smartbear.soapui.version>5.4.0</smartbear.soapui.version>
<com.jgoodies.forms.version>1.0.7</com.jgoodies.forms.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<!-- http://smartbearsoftware.com/repository/maven2/com/smartbear/soapui/soapui-maven-plugin/ -->
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>${smartbear.soapui.version}</version>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>${com.jgoodies.forms.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>soapui-project.xml</projectFile>
<outputFolder>soap-ui-report</outputFolder>
<printReport>true</printReport>
<junitReport>true</junitReport>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme.rest-service.test</groupId>
<artifactId>rest-service</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>SOAP UI Sanity Test Suite For RESR Service</name>
<properties>
<smartbear.soapui.version>5.4.0</smartbear.soapui.version>
<com.jgoodies.forms.version>1.0.7</com.jgoodies.forms.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<!-- http://smartbearsoftware.com/repository/maven2/com/smartbear/soapui/soapui-maven-plugin/ -->
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>${smartbear.soapui.version}</version>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>${com.jgoodies.forms.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>soapui-project.xml</projectFile>
<outputFolder>soap-ui-report</outputFolder>
<printReport>true</printReport>
<junitReport>true</junitReport>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I've found the solution. The problem was, that pom.xml was misconfigured. I moved "configuration" node in the "plugin" node from the "executions" node and test report in xUnit format was successfully generated.
updated pom.xml:
Spoiler<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme.rest-service.test</groupId>
<artifactId>rest-service</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>SOAP UI Sanity Test Suite For RESR Service</name>
<properties>
<smartbear.soapui.version>5.4.0</smartbear.soapui.version>
<com.jgoodies.forms.version>1.0.7</com.jgoodies.forms.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<!-- http://smartbearsoftware.com/repository/maven2/com/smartbear/soapui/soapui-maven-plugin/ -->
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>${smartbear.soapui.version}</version>
<configuration>
<projectFile>soapui-project.xml</projectFile>
<outputFolder>soap-ui-report</outputFolder>
<printReport>true</printReport>
<junitReport>true</junitReport>
</configuration>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>${com.jgoodies.forms.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>