soapUI+maven+Jenkins 搭建接口自动化持续集成平台

1.搭建个Jenkins 环境

2.再Jenkins中安装maven 插件

3.Jenkins上新建选取构建maven项目,配置如下,其余均可默认



4.pom.xml文件如下:

  1. <pluginRepositories> 
  2.                <pluginRepository> 
  3.                       <id> smartbear- sweden-plugin -repository</ id> 
  4.                       <url> http://www.soapui.org/repository/maven2/</url > 
  5.                </pluginRepository> 
  6.         </pluginRepositories> 
  7.  
  8.         <build> 
  9.                <plugins> 
  10.                       <plugin> 
  11.                             <groupId> com.smartbear.soapui</groupId > 
  12.                             <artifactId> soapui-pro- maven-plugin </artifactId> 
  13.                             <!-- 根据实际情况填写版本号 --> 
  14.                             <version> 5.1.1</version > 
  15.                             <configuration> 
  16.                             </configuration> 
  17.                             <dependencies> 
  18.                                    <dependency> 
  19. <groupId> org.reflections</groupId > 
  20.                                           <artifactId> reflections</artifactId > 
  21.                                           <version> 0.9.9-RC1</version > 
  22.                                    </dependency> 
  23.                                    <dependency> 
  24.                                           <groupId> org.apache.poi</groupId > 
  25.                                           <artifactId> poi-ooxml</ artifactId> 
  26.                                           <version> 3.10-FINAL</version > 
  27.                                    </dependency> 
  28.                             </dependencies> 
  29.  
  30.                             <executions> 
  31.                                    <execution> 
  32.                                           <phase> test</phase > 
  33.                                           <goals> 
  34.                                                  <goal> test</goal > 
  35.                                           </goals> 
  36.                                           <configuration> 
  37.                                           <!--填写需要执行的脚本路径  --> 
  38.                                                  <projectFile> F:\soapUI\REST-Project-1-soapui-project.xml </projectFile> 
  39.                                                  <projectProperties> 
  40.                                                         <value> message=API TEST</value> 
  41.                                                  </projectProperties> 
  42.                                           </configuration> 
  43.                                    </execution> 
  44.                             </executions> 
  45.                       </plugin> 
  46.                </plugins> 
  47.         </build> 
<pluginRepositories>
               <pluginRepository>
                      <id> smartbear- sweden-plugin -repository</ id>
                      <url> http://www.soapui.org/repository/maven2/</url >
               </pluginRepository>
        </pluginRepositories>

        <build>
               <plugins>
                      <plugin>
                            <groupId> com.smartbear.soapui</groupId >
                            <artifactId> soapui-pro- maven-plugin </artifactId>
                            <!-- 根据实际情况填写版本号 -->
                            <version> 5.1.1</version >
                            <configuration>
                            </configuration>
                            <dependencies>
                                   <dependency>
                                          <groupId> org.reflections</groupId >
                                          <artifactId> reflections</artifactId >
                                          <version> 0.9.9-RC1</version >
                                   </dependency>
                                   <dependency>
                                          <groupId> org.apache.poi</groupId >
                                          <artifactId> poi-ooxml</ artifactId>
                                          <version> 3.10-FINAL</version >
                                   </dependency>
                            </dependencies>

                            <executions>
                                   <execution>
                                          <phase> test</phase >
                                          <goals>
                                                 <goal> test</goal >
                                          </goals>
                                          <configuration>
                                          <!--填写需要执行的脚本路径  -->
                                                 <projectFile> F:\soapUI\REST-Project-1-soapui-project.xml </projectFile>
                                                 <projectProperties>
                                                        <value> message=API TEST</value>
                                                 </projectProperties>
                                          </configuration>
                                   </execution>
                            </executions>
                      </plugin>
               </plugins>
        </build>
  1. </pre><pre name="code" class="html"> 
</pre><pre name="code" class="html">
5. 构建
如果构建从maven中心下载插件很慢的话,可以自己搭建个maven 私服

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值