2

我正在尝试通过 Jenkins 上的 Maven 构建 SoapUI testSuite。使用 maven,我能够在本地机器上成功构建 testSuite,并且所有测试用例也都执行了。但是在 Jenkins 上,它似乎没有找到任何要运行的测试套件!这让我很困惑,因为这是我第一次涉足 SoapUI、Maven 和 Jenkins。

Jenkins 的控制台输出为:

[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ WAR_DDCService ---
[INFO] No sources to compile
[INFO] [debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /var/lib/jenkins/jobs/DDCAutomationSuite/workspace/src/test/resources
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ WAR_DDCService ---
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ WAR_DDCService ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ WAR_DDCService ---
[INFO] No tests to run.
[INFO] Surefire report directory: /var/lib/jenkins/jobs/DDCAutomationSuite/workspace/target/surefire-reports

在查看输出时,令我困惑的是它似乎在“资源”文件夹中寻找测试套件。然而,soapui 测试套件位于 src/tests/soapui 文件夹中。

下面是这个项目的 pom.xml 文件中我也提到了路径的部分。有人可以帮助我了解我哪里出错了吗?

我也在配置的 pom.xml 中指定了项目文件的以下位置。

Hi Samuel, thank you for the response. Please find the pom.xml content below:

<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>                
<configuration>
<projectFile>src/test/soapui/DaonDerivedCredential-soapui-project.xml</projectFile>
<outputFolder>${project.build.directory}/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>true</printReport>
<projectProperties>
<projectProperty>endpoint=<a href="http://foo.com/foo-0.2.1-SNAPSHOT/services/ddc</a></projectProperty>
</projectProperties>
</configuration>
</plugin>

当我通过命令提示符从本地设置运行构建时,我给出命令“mvn eviware:maven-soapui-plugin:test”,该命令执行位于 /src/test/soapui 文件夹中的 SoapUI TestSuite。在詹金斯..我不知道詹金斯必须在哪里输入这个命令才能执行它。

4

1 回答 1

0

Go in "Goals and options" form input, in the config file of your project in Jenkins (probably near the bottom of the page).

You can set it to

clean eviware:maven-soapui-plugin:test

in order to have jenkins performing your tests.

As by default this goal is bound to the integration-test phase, it should go throught the default lifecycle and finish by performing your tests.

For more info, see :

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
于 2013-02-01T12:58:22.973 回答