jenkins日志中丢失的soapui请求有效载荷



有一个非常奇怪且令人沮丧的情况。

我目前在Ubuntu中使用SOAPUI测试REST服务。在soapui.log中,以及在每个请求生成的文本文件中,我可以看到有关每个请求的全部信息(请求标题,URL和有效载荷以及响应标题以及消息。来自UI,以及CLI。

但是,当我通过Jenkins运行测试并检查日志时,仅丢失了请求有效负载(JSON)。这是开发人员在调查问题时需要知道的第一个信息。

我几乎无法控制詹金斯所做的事情。我确实知道它正在使用Jenkins用户通过CLI运行TestRunner。

谁能想到可能导致请求有效载荷未记录的任何设置或配置?我认为詹金斯正在做/配置不同的事情,但我无法分辨什么。

另一个选项可能是使用jenkins上的soapui maven插件运行测试柜

  <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>nz.geek.karit.app</groupId>
   <artifactId>app</artifactId>
   <packaging>jar</packaging>
   <version>1.0-SNAPSHOT</version>
   <name>app</name>
   <url>http://maven.apache.org</url>
   <!--Add the repository for where Maven can find the soapUI Plugin-->
   <pluginRepositories>
      <pluginRepository>
         <id>smartbear-sweden-plugin-repository</id>
         <url>http://smartbearsoftware.com/repository/maven2/</url>
      </pluginRepository>
   </pluginRepositories>
   <build>
      <plugins>
         <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-maven-plugin</artifactId>
            <!--This is the version of soapUI to grab from plugin repo-->
            <!--At the time of writing the 3.0.1 plugin had not been created-->
            <version>5.3.0</version>
            <configuration>
               <!--The location of your soapUI setting file-->
               <projectFile>/home/test/test.xml</projectFile>
               <!--Where to place the output of the run-->
               <outputFolder>/home/test/output/</outputFolder>
               <!--Make the jUnit results file-->
               <junitReport>true</junitReport>
            </configuration>
            <executions>
               <execution>
                  <id>soapUI</id>
                  <!--Run as part of the test phase in the Maven lifecycle-->
                  <phase>test</phase>
                  <goals>
                     <!--Run the test phase of eviware:maven-soapui-plugin-->
                     <goal>test</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
</project>

输出文件夹应包含细节日志。

有关更多信息,请参考:http://blog.karit.geek.nz/2009/08/using-soapui-to-do-testing-testing-as-part-of.html

最新更新