Maven SoapUI插件-如何在Maven的生命周期中执行2个SoapUI测试项目 [英] Maven SoapUI plugin - how to execute 2 SoapUI test projects during Maven's lifecycle

查看:113
本文介绍了Maven SoapUI插件-如何在Maven的生命周期中执行2个SoapUI测试项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个要在构建过程中运行的SoapUI测试项目(为此,我正在使用maven-soapui-plugin 3.6.1和Maven 3). 当前,我所能做的就是仅执行1个项目(请参阅我的pom.xml文件)...假设我要执行2个SoapUI测试项目并控制它们的执行顺序... 正确的语法是什么?

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 ?

我当前的pom.xml文件:

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>

推荐答案

您可以为SoapUI插件指定多个执行.例如:

You can specify multiple executions for SoapUI plugin. For example:

 <plugin>                                                                                                                      
     <groupId>eviware</groupId>                                                                                                
     <artifactId>maven-soapui-plugin</artifactId>                                                                              
     <version>3.6.1</version>                                                                                                  
     <configuration>                                      
         <outputFolder>${project.basedir}\src\test\resources\soapui\output</outputFolder>
         <junitReport>true</junitReport>
     </configuration>
     <executions>
         <execution>
             <id>soapUI1</id>
             <phase>test</phase>
             <goals>
                 <goal>test</goal>
             </goals>
            <configuration>
              <projectFile>${project.basedir}\src\test\resources\soapui\Web-Service-automatic-testing-soapui-project1.xml</projectFile> 
            </configuration>
         </execution>                                                                                                          
         <execution>
             <id>soapUI2</id>
             <phase>test</phase>
             <goals>
                 <goal>test</goal>
             </goals>
            <configuration>
              <projectFile>${project.basedir}\src\test\resources\soapui\Web-Service-automatic-testing-soapui-project2.xml</projectFile> 
            </configuration>
         </execution>                                                                                                          
     </executions>                                                                                                             
 </plugin>

这篇关于Maven SoapUI插件-如何在Maven的生命周期中执行2个SoapUI测试项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆