Wednesday, 11 April 2012

Running Multiple SoapUI Mock Services from single Maven pom


Sometimes we may need to run multiple SoapUI mock services as part of Test cases, usually if we start multiple mock services from SoapUI, all will start in the same port, but for some reason it is not supported when we start as part of maven execution. Below is the pom entry which is used to start two or more mock services in different ports.

<plugin>
        <groupId>eviware</groupId>
          <artifactId>maven-soapui-plugin</artifactId>         
          <executions>
            <execution>
              <id>soapui-test1</id>
              <phase>test</phase>
              <goals>
                <goal>mock</goal>
              </goals>
              <configuration>            
                   <projectFile>target/mock-project1.xml</projectFile>
                   <port>8088</port>
                   <noBlock>true</noBlock>
                 </configuration>
            </execution>
            <execution>
              <id>soapui-test2</id>
              <phase>test</phase>
              <goals>
                <goal>mock</goal>
              </goals>
             <configuration>           
                   <projectFile>target/mock-project2.xml</projectFile>
                   <port>8089</port>
                   <noBlock>true</noBlock>
                 </configuration>             
            </execution>
          </executions>
        </plugin>

0 comments:

Post a Comment