Automated SOAP testing with maven and the SoapUI plugin soapui1

Automated SOAP testing with maven and the SoapUI plugin

Currently there are few tools that can support testing SOAP interfaces. Both Jmeter and SoapUI are suited for testing soap interfaces. SoapUI is explicitly created for testing SOAP interfaces and Jmeter has a SOAP support since version 2.3.x. I have worked with both tools and I prefer SoapUI. It has an intuitive user interface and is flexible. (Please also have a look at the blog of Jeroen)

You can run SoapUI stand alone but I prefer to integrate these kinds of tools with an automated process. Below you will find instructions for running SoapUI as a part of a maven build. This makes it possible to run your automated SOAP tests in Maven with a build process like Hudson. Combined with automatic deployment it is possible to support an agile software development process that supports frequent delivery of versions and continuous testing.

Maven supports SoapUI with the Maven SoapUI plugin.

Usage:

Add the eviware plugin repository to your repository list.

<pluginRepositories>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>

 

Attach to verify phase

By attaching the SoapUI maven plugin to the verify phase your build process runs it automatically in the integration-test phase. The “iso-soapui-project.xml” is the reference to the SoapUI xml file.

<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<phase>verify</phase>
<id>soapui-tests</id>
<configuration>
<projectFile>${basedir}/src/test/soapui/iso-soapui-project.xml</projectFile>
<outputFolder>${basedir}/target/soapui</outputFolder>
<junitReport>true</junitReport>
<exportwAll>true</exportwAll>
<printReport>false</printReport>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>

 

Convert log to a report

The log export of SoapUI can be interpreted like a normal Surefire unit report. By just adding this part to your maven reports section you can generate a nice overview of your test results.

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>target/site/soapui</outputDirectory>
<reportsDirectories>
<reportsDirectories>target/soapui/</reportsDirectories>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>

 

Example report.

Automated SOAP testing with maven and the SoapUI plugin soapui

5 Comments

  1. vinay February 28, 2011
  2. Robbrecht van Amerongen March 7, 2010
  3. Raj March 2, 2010
  4. Robbrecht van Amerongen February 26, 2010
  5. Damien February 24, 2010