Forum Discussion

torstenreinhard's avatar
torstenreinhard
Occasional Contributor
17 years ago

Build breaks:call of Testrunners main() method internally uses System.exit(..)

Hi,

I´ve tried to use the maven-soapui-pro-plugin or even the com.eviware.soapui.SoapUIProTestCaseRunner directly from an ant-task, the exec-maven-plugin or whatever.

The VM of the Maven build breaks immediately, if the SoapUIProTestCaseRunner terminates, even if there is no error. I´ve used JAD to have a look at the source and found "System.exit(...)" calls in AbstractSoapUIRunner.runFromCommandLine(...) responsible for that.

=> the main Methods should return an int, so internally you have to change some methods from void to boolean or int.

A workaround actually is to subclass the existing Runners and to overwrite runFromCommandLine.
A nightly build that fixes that problem would be very appreciated:-)

Thanx, Torsten

2 Replies

  • Hi Torsten,

    this is fixed in the core jars of the latest nightly build, but the maven plugins may still need to be updated.. please give it a go and let me know.

    regards!

    /Ole
    eviware.com
  • al0's avatar
    al0
    Occasional Contributor
    It seems that this (or very similar) problem still exists), in both 3.0.1 and 3.5-beta2 versions of the plugin.

    Here is a quote from the build output:

    [INFO] [soapui:test {execution: soapui-test-pm2}]
    soapUI 3.5-beta2 Maven2 TestCase Runner
    ... Skipped ...
    TestCase [TestDeleteContract] failed without assertions

    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 20 minutes 56 seconds
    [INFO] Finished at: Wed Mar 31 13:07:13 CEST 2010
    [INFO] Final Memory: 109M/508M
    [INFO] ------------------------------------------------------------------------


    More exactly, if at least one of the tests fails, then after the execution of the plugin Maven build finishes without status (neither SUCCESS nor FAILURE).

    Here is a plugin configuration:

    <properties>
        <mavenSoapUiPlugin.pathSoapUiProjects>../src/test/resources/soapUI/</mavenSoapUiPlugin.pathSoapUiProjects>
        <mavenSoapUiPlugin.pathSoapUiOutputFolder>./target/maven-soapui-reports</mavenSoapUiPlugin.pathSoapUiOutputFolder>
        <mavenSoapUiPlugin.version>3.5-beta2</mavenSoapUiPlugin.version>
        <mavenSoapUiPlugin.saveAfterRun>false</mavenSoapUiPlugin.saveAfterRun>
        <mavenSoapUiPlugin.test.FailIgnore>false</mavenSoapUiPlugin.test.FailIgnore>
        <mavenSoapUiPlugin.urlWebServices>http://localhost:8080/ncs-fbs-web/ncs/services/fbs</mavenSoapUiPlugin.urlWebServices>
        <mavenSoapUiPlugin.urlRest>http://localhost:8080/ncs-fbs-web/ncs/rest/2.0/</mavenSoapUiPlugin.urlRest>
    </properties>
    ... Skipped ...
            <plugin>
                <groupId>eviware</groupId>
                <artifactId>maven-soapui-plugin</artifactId>
                <version>${mavenSoapUiPlugin.version}</version>
                <executions>
                    <execution>
                        <id>soapui-test-cm2</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <projectFile>${mavenSoapUiPlugin.pathSoapUiProjects}NCS-ContractManagementService-v2-soapui-project.xml</projectFile>
                            <saveAfterRun>${mavenSoapUiPlugin.saveAfterRun}</saveAfterRun>
                            <test.FailIgnore>${mavenSoapUiPlugin.test.FailIgnore}</test.FailIgnore>
                            <outputFolder>${mavenSoapUiPlugin.pathSoapUiOutputFolder}</outputFolder>
                            <projectProperties>
                                <projectProperty>HOST=${mavenSoapUiPlugin.urlWebServices}</projectProperty>
                                <projectProperty>HOST_REST=${mavenSoapUiPlugin.urlRest}</projectProperty>
                            </projectProperties>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>eviware</groupId>
                        <artifactId>maven-soapui-plugin</artifactId>
                        <version>${mavenSoapUiPlugin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>