【发布时间】:2022-12-10 09:48:42
【问题描述】:
我正在从 Jenkins 运行 SoapUI 测试。 我已将我的 soapui-project.xml 文件放在我的 pom.xml 所在的同一目录中,该目录位于 bitbucket 的 master 中。 Jenkins 能够选择我的 pom.xml 中的所有更改。但不运行测试。 詹金日志说“没有测试运行”
我尝试添加源代码并将我的 soapui-project.xml 文件放在 src/main/resources 中,并保持低于属性。
<sourceDirectory>src/main/resources</sourceDirectory>
<testSourceDirectory>src/main/resources</testSourceDirectory>
但行为没有改变。
我的 pom.xml 如下
<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>
<name>Test soapui</name>
<groupId>RestCountriesInfo</groupId>
<artifactId>com.example.soapuitests</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>SOAPUITesting</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<!-- <sourceDirectory>src</sourceDirectory>
<testSourceDirectory>src/main/resources</testSourceDirectory>
-->
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.5.0</version>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>RestCountriesInfo</id>
<configuration>
<projectFile>RestCountriesInfo-soapui-project.xml</projectFile>
<outputFolder>src/main/resources/report</outputFolder>
<testSuite>DEV</testSuite>
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<printReport>true</printReport>
<testFailIgnore>true</testFailIgnore>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
这是詹金斯日志
Posting build status of INPROGRESS to SWC Bitbucket for commit id [d95035dda15d279d5622478d8dbd178591e1f66a] and ref 'refs/heads/master'
Failed to post build status, additional information: timeout
[API_TEST] $ /opt/maven/bin/mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< RestCountriesInfo:com.example.soapuitests >--------------
[INFO] Building Test soapui 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ com.example.soapuitests ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ com.example.soapuitests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ com.example.soapuitests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ com.example.soapuitests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/jenkins/workspace/Feature/Dev/API_TEST/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ com.example.soapuitests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ com.example.soapuitests ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.454 s
[INFO] Finished at: 2022-11-29T12:47:34+11:00
[INFO] ------------------------------------------------------------------------
知道为什么 Jenkins 无法执行我的测试。
【问题讨论】:
标签: jenkins testing maven-2 soapui