I have 2 different SoapUI test projects that I want to run during the build (I am using maven-soapui-plugin 3.6.1 and Maven 3 for that). Currently all I can do is to execute only 1 project (see my pom.xml file)... Suppose I want to execute 2 SoapUI test projects and also control their execution order... What is the correct syntax to do so ?
My current pom.xml file :
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<projectFile>${project.basedir}\src\test\resources\soapui\Web-Service-automatic-testing-soapui-project.xml</projectFile>
<outputFolder>${project.basedir}\src\test\resources\soapui\output</outputFolder>
<junitReport>true</junitReport>
</configuration>
<executions>
<execution>
<id>soapUI</id>
<!--Run as part of the test phase in the Maven lifecycle-->
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
You can use this plugin for above requirement. Given below is a code block for it.
Don't go the maven route. use command line testrunner.sh and run all the tests in a for loop.
Running soapui composite project from junit test
Only major issue for running SOAPUI project from junit tests is finding all correct dependency jars of SOAPUI.
I have created an uber jar of all required jars. This new jar is added below on GitHub code base in lib folder. This uber jar is compatible with Ready API 1.5.0 version. (Note that, I have tried it with rest API testing with composite project)
Junit test case takes composite project path and runs all test steps from each test case.
Running tests at step level helps to debug if build fails.
http://www.learnteachandlearn.com/2015/12/executing-composite-soapui-project-from.html
https://github.com/suyogchoudhari/soapui-junit
You can specify multiple executions for SoapUI plugin. For example: