Forum Discussion

arokia's avatar
arokia
Occasional Contributor
12 years ago

SoapUI Jenkins reporting

I used soapui-maven-plugin to integrate my soapUI test on Jenkins.
Now my tests are running fine . But the reporting in the Jenkins console output says the following:

-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

Please let me know what I am missing to get these results populated. how do we report using soapui-maven-plugin without Junits.

5 Replies

  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi, the log you propose comes from the surefire plugin

    can you share your pom file please, it will be easier to answer to your question?
  • arokia's avatar
    arokia
    Occasional Contributor
    I just pulled out surefire plugin and Maven SoapUI maven plugin from my pom

    <plugin>
    <groupId>com.smartbear.soapui</groupId>
    <artifactId>soapui-maven-plugin</artifactId>
    <version>4.6.1</version>
    <configuration>
    <projectFile>src/test/resources/XXXX.xml</projectFile>
    <testSuite>XXXTestSuite</testSuite>
    </configuration>
    <executions>
    <execution>
    <id>soapui-test</id>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    </executions>
    </plugin>

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-report-plugin</artifactId>
    <version>2.15</version>
    </plugin>
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi,
    to have xml junit result files generated by soapui, you need to set the junitReport parameter to true. Additionnaly, configure the outputDirectory parameter to a specific location otherwise soapui generates file in the jvm "user.dir" (usually the root directory of your maven project). Generally, maven users set it to a subdirectory of ${project.build.directory}.

    Then you can use jenkins junit plugin to publish the junit report (configure path to the soapui output directory and include all xml files)

    You provide a maven-surefire-report-plugin configuration. Does this mean you want maven to also generate junit html reports?
  • arokia's avatar
    arokia
    Occasional Contributor
    Basically what I am trying is , I want my Jenkins build to fail when my soapui test fails. Any help is appreciated.
    My current pom looks like this :

    <plugin>
    <groupId>com.smartbear.soapui</groupId>
    <artifactId>soapui-maven-plugin</artifactId>
    <version>4.6.1</version>

    <executions>
    <execution>
    <id>run-soap-test-1</id>
    <configuration>
    <projectFile>xxx.xml</projectFile>

    <outputFolder>target/surefire-reports</outputFolder>
    <testSuite>xxxSuite</testSuite>

    <junitReport>true</junitReport>
    <exportwAll>true</exportwAll>
    <printReport>true</printReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    <execution>
    <id>run-soap-test-2</id>
    <configuration>
    <projectFile>xxx.xml</projectFile>
    <outputFolder>target/surefire-reports</outputFolder>
    <testSuite>xxxxSuite</testSuite>

    <junitReport>true</junitReport>
    <exportwAll>true</exportwAll>
    <printReport>true</printReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    </executions>
    </plugin>
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    With you pom configuration, Jenkins should mark your build as unstable.
    I now that maven job used to detect soapui junit xml files but this was prior the groupId/artifactId of the plugin changed. Maybe this does not work anymore.

    You can also use a freestyle job which allows you to configure the directory where the junit xml files are generated (configure post-build step "Publish JUnit test result report")

    I have started a summary about this here: https://github.com/redfish4ktc/maven-so ... ps#jenkins

    Some remarks about the plugin configuration in your pom (not related to jenkins failures/errors detection)
    * use exportAll instead of exportwAll
    * as most of the configuration for both executions is the same, you can put it outside of the executions block

    <plugin>
    <groupId>com.smartbear.soapui</groupId>
    <artifactId>soapui-maven-plugin</artifactId>
    <version>4.6.1</version>
    <configuration>
    <junitReport>true</junitReport>
    <exportAll>true</exportAll>
    <outputFolder>target/surefire-reports</outputFolder>
    <printReport>true</printReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <executions>
    <execution>
    <id>run-soap-test-1</id>
    <configuration>
    <projectFile>xxx.xml</projectFile>
    <testSuite>xxxSuite</testSuite>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    <execution>
    <id>run-soap-test-2</id>
    <configuration>
    <projectFile>xxx.xml</projectFile>
    <testSuite>xxxSuite</testSuite>
    </configuration>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    </executions>
    </plugin>