Step by Step Instructions to Setup SoapUI project to run as part of CI with Maven

12,274

Here https://stackoverflow.com/a/17802822/2324993 I've already answer how to run soap ui tests via shell script.

So you just need to run this script with maven. You can do it for example with this maven plugin: http://mojo.codehaus.org/exec-maven-plugin/usage.html. You can use it to execute a shell script, or any other executable

Share:
12,274
user2495926
Author by

user2495926

Updated on June 15, 2022

Comments

  • user2495926
    user2495926 about 2 years

    There currently is a Continuous Integration framework running Selenium scripts with maven 3.0.4 which are invoked by Jenkins. I've created a project in SoapUI containing a number of tests within a test suite. I'd like to be have the SoapUI scripts to run as part of the existing Continuous Integration process but can't seem to get it going. I'v done extensive research and thus this is my last resort. Can somebody please provide step by step instructions on setting this up? I've done the following so far:

    Created a folder in the Workspace directory for the REST tests.

    Created an src folder within the above mentioned directory (Workspace). The src folder consists of the following structure: src/test/soapui/xml file with the name of the soapui project

    Directly within the src folder I have a pom.xml file with the following:

    <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>
    
       <name>Web Service Test Module</name>
       <groupId>com.dstvo</groupId>
       <artifactId>SOA-Tesing</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <packaging>pom</packaging>
       <description>Web Service soapUI integration tests</description>
           <pluginRepositories>
            <pluginRepository>
                <id>eviwarePluginRepository</id>
                <url>http://www.soapui.org/repository/maven2/</url>
            </pluginRepository>
        </pluginRepositories>
       <build>
          <plugins>            
             <plugin>
                  <groupId>eviware</groupId>
                  <artifactId>maven-soapui-plugin</artifactId>
                  <version>4.0.0</version>
                <configuration>
                   <projectFile>src/test/soapui/REST-Testing-soapui-project.xml</projectFile>
                   <host>local host and port</host>
                   <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
                   <junitReport>true</junitReport>
                   <printReport>false</printReport>
                </configuration>        
                <executions>
                   <execution>
                      <id>Soa_Tests</id>
                      <goals>
                         <goal>test</goal> 
                      </goals>
                      <phase>test</phase>           
                   </execution>
                </executions>           
             </plugin>   
          </plugins>
       </build>          
    </project>
    

    I don't know if the pom.xml file is all that's needed in order to have the soapui tests run with maven or if there are some steps that I'm missing? Please help?