不是所有的SoapUI测试都从Maven版本执行

时间:2019-07-02 08:31:32

标签: maven jenkins soapui

我创建了一个soapui测试用例来测试其余的Web服务。所有步骤都可以从SoapUI正常执行。但是当我将其与maven集成并进行构建时,并非所有步骤都在执行。

我正在使用groovy脚本来声明响应。 也使用财产转移

Maven插件配置如下:

 <plugin>
            <groupId>com.smartbear.soapui</groupId>
   <artifactId>soapui-pro-maven-plugin</artifactId>
   <version>4.6.1</version>
            <executions>
               <execution>
                  <id>QClearanceTest</id>
                  <goals>
                     <goal>test</goal> 
                  </goals>
                  <phase>test</phase>           
               </execution>
            </executions>                       
            <configuration>
               <projectFile>soapui/soapui-project.xml</projectFile>          
               <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
               <junitReport>true</junitReport>
               <printReport>true</printReport>
               <projectProperties>
                  <projectProperty>NameInsured=Company</projectProperty>
               </projectProperties>
      <settingsFile>soapui\soapui-settings.xml</settingsFile>
            </configuration>
         </plugin> 

谢谢。

1 个答案:

答案 0 :(得分:0)

在升级插件并添加依赖项后,它可以工作:

 <plugin>
        <groupId>com.smartbear.soapui</groupId>
        <artifactId>soapui-maven-plugin</artifactId>
        <version>5.5.0</version>
        <executions>
            <execution>
                <id>QClearanceTest</id>
                <goals>
                    <goal>test</goal>
                </goals>
                <phase>test</phase>
            </execution>
        </executions>
        <configuration>
            <projectFile>soapui/soapui-project.xml</projectFile>
            <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
            <junitReport>true</junitReport>
            <printReport>true</printReport>
            <projectProperties>
                <projectProperty>NameInsured=Company</projectProperty>
            </projectProperties>
            <settingsFile>soapui\soapui-settings.xml</settingsFile>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>com.jgoodies</groupId>
                <artifactId>forms</artifactId>
                <version>1.0.7</version>
            </dependency>
        </dependencies>
    </plugin> 

soapui-settings.xml

<con:soapui-settings xmlns:con="http://eviware.com/soapui/config">
   <con:setting id="HttpSettings@socket_timeout">200000</con:setting>
</con:soapui-settings>