How to combine SoapUI, Maven and HermesJMS with Jenkins build?

254 Views Asked by At

My soap project with HermesJMS works perfectly when run from SoapUI, Command Line (mvn test). However, it fails when the same project is run on Jenkins. I get the below error on the Jenkins console:

SoapUI 5.4.0 Maven2 TestCase Runner
2018-10-22 13:35:27,446 [main] INFO  
com.eviware.soapui.tools.SoapUITestCaseRunner - Setting global property [ENV] to [TEST]
 13:35:27,839 WARN  [SoapUI] Missing folder [../ext] for external libraries
 13:35:27,839 INFO  [DefaultSoapUICore] Creating new settings at [/../soapui-settings.xml]
 13:35:29,217 INFO  [PluginManager] 0 plugins loaded in 25 ms
 13:35:29,217 INFO  [DefaultSoapUICore] All plugins loaded
 13:35:30,718 INFO  [WsdlProject] Loaded project from [file:../..soapui-project.xml]
 13:35:30,728 INFO  [SoapUITestCaseRunner] Running SoapUI tests in project 
 13:35:30,729 INFO  [SoapUITestCaseRunner] Running Project runType = SEQUENTIAL
 13:35:30,746 INFO  [SoapUITestCaseRunner] Running SoapUI testcase [TestCase 1]
 13:35:30,782 INFO  [SoapUITestCaseRunner] running step [SOAP Request]
 HermesJMS Home must be set in global preferences
 13:35:30,833 ERROR [SoapUI] An error occurred [HermesJMS home not specified !!!], see error log for details
 java.io.FileNotFoundException: HermesJMS home not specified !!!

And below is my pom.xml:

<build>
    <plugins>
        <plugin>
        <groupId>com.smartbear.soapui</groupId>
        <artifactId>soapui-maven-plugin</artifactId>
        <version>5.4.0</version>
        <configuration> </configuration>
            <dependencies>
                <dependency>
                <groupId>com.jgoodies</groupId>
                <artifactId>forms</artifactId>
                <version>1.0.7</version>
                </dependency>
                <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.20</version>
                </dependency>
                <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.6</version>
                </dependency>
                <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
                </dependency>
                <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-site-renderer</artifactId>
                <version>1.8.1</version>
                </dependency>
                <dependency>
                    <groupId>hermesjms</groupId>
                    <artifactId>hermes</artifactId>
                    <version>1.14</version>
                </dependency>

            </dependencies>
        <executions>
            <execution>
            <id>SoapUI Tests</id>
            <phase>test</phase>
                <goals>
                <goal>test</goal>
                </goals>
                <configuration>
                <globalProperties>
                <value>ENV=TEST</value>
                </globalProperties>
                <projectFile>..soapui-project.xml</projectFile>
                 <!--
                <outputFolder>${basedir}/target/SoapUI-Report</outputFolder> 
                -->
                <outputFolder>${basedir}/target/surefire-reports</outputFolder>
                <junitReport>true</junitReport>
                <exportAll>true</exportAll>
                <printReport>true</printReport>
                <environment>DEV</environment>
                <testFailIgnore>true</testFailIgnore>
                </configuration>
            </execution>
        </executions>
        </plugin>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.20</version>
            <executions>
                <execution>
                <phase>test</phase>
                <goals>
                <goal>report-only</goal>
                </goals>
                </execution>
        </executions>
        </plugin>
    </plugins>
</build>

What am I missing in the pom.xml or do I need to update soapui-setting.xml with HermesJMS location in the jenkins server where it gets built?

0

There are 0 best solutions below