Hebla
11 years agoOccasional Contributor
Jenkins, Maven + SoapUI. Need some config help
Hi
I've been struggeling a bit setting up Jenkins, Maven and SoapUI.
First off, here are my POM.xml
First off, I can't get it to run the testSuite I want. Here is my SoapUI project:
I have the same testsuite as you can see here copied and modified slightly to see the different names in the testingFI testsuite as well.
No matter what I do, it insists on running both the testsuites, and if I try specifying a testcase, it runs that everything anyways. Now it does stop after the first testsuite, since there are failures when running it with maven, see more details below.
-----
Problem Nr 2.
I have a groovy script library in soapUI. However, this does not work when running the tests with Maven. I get:
15:06:11,556 ERROR [SoapUI] An error occurred [No such property: SOSvalidation for class: Script1], see error log for details
groovy.lang.MissingPropertyException: No such property: SOSvalidation for class: Script1
How can I hook this up?
-----
Problem nr 3.
JUnit reporting. When I run this in Maven command line, I can see the test run one by one, and I can see the testreports in the surefire-reports folder. When I run this in Jenkins, Jenkins only reports 2 tests run. I have no way of seeing how the individual tests went. To me it looks like there are no surefire-reports. I tried setting the surefire folders to /reports, instead of surefire-reports, but this folder is still empty. This is what I see in Jenkins:
Is this all I am supposed to see? The different errors are test-steps that try to use the groovy library... I have no reports on the other test-steps, or the other testsuite, the one that my POM is actually trying to run.
Do I have to make a testCase for each test I want a report on, instead of using teststeps? We have 50 services, that needs to be tested for different countries, so being able to use a test test-step as a Unit-test would be quite a lot better than having to use a testCase for each of the services(making setup a lot easier in this case).
I hope someone with a bit more experience than me can help me, I have been using a bit more time trying to figure this out that I thought I would...
I've been struggeling a bit setting up Jenkins, Maven and SoapUI.
First off, here are my 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>Jenkins test</name>
<artifactId>MavenTestId</artifactId>
<groupId>JenkinsTestGroup</groupId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Jenkins test</description>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>4.6.1</version>
<executions>
<execution>
<id>LightLogin</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<projectFile>src/test/soapui/mNILL_FI.xml</projectFile>
<outputFolder>${project.build.directory}/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>false</printReport>
<properties>
<testSuite>testingFI</testSuite>
</properties>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.17</version>
<configuration>
<outputDirectory>${project.build.directory}/reports</outputDirectory>
<reportsDirectories>
<reportsDirectories>${project.build.directory}/reports</reportsDirectories>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
First off, I can't get it to run the testSuite I want. Here is my SoapUI project:
I have the same testsuite as you can see here copied and modified slightly to see the different names in the testingFI testsuite as well.
No matter what I do, it insists on running both the testsuites, and if I try specifying a testcase, it runs that everything anyways. Now it does stop after the first testsuite, since there are failures when running it with maven, see more details below.
-----
Problem Nr 2.
I have a groovy script library in soapUI. However, this does not work when running the tests with Maven. I get:
15:06:11,556 ERROR [SoapUI] An error occurred [No such property: SOSvalidation for class: Script1], see error log for details
groovy.lang.MissingPropertyException: No such property: SOSvalidation for class: Script1
How can I hook this up?
-----
Problem nr 3.
JUnit reporting. When I run this in Maven command line, I can see the test run one by one, and I can see the testreports in the surefire-reports folder. When I run this in Jenkins, Jenkins only reports 2 tests run. I have no way of seeing how the individual tests went. To me it looks like there are no surefire-reports. I tried setting the surefire folders to /reports, instead of surefire-reports, but this folder is still empty. This is what I see in Jenkins:
Is this all I am supposed to see? The different errors are test-steps that try to use the groovy library... I have no reports on the other test-steps, or the other testsuite, the one that my POM is actually trying to run.
Do I have to make a testCase for each test I want a report on, instead of using teststeps? We have 50 services, that needs to be tested for different countries, so being able to use a test test-step as a Unit-test would be quite a lot better than having to use a testCase for each of the services(making setup a lot easier in this case).
I hope someone with a bit more experience than me can help me, I have been using a bit more time trying to figure this out that I thought I would...