Forum Discussion

rohitvarsha12's avatar
rohitvarsha12
Contributor
8 years ago

Report shows pass even though test case is failed

Hi,

I am trying to run my SOAP UI project from maven so that I can integrate this in Jenkin.

 

Maven File I am using:

 

<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>
<groupId>com.test</groupId>
<artifactId>M1_APIHealthCheck</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>M1_APIHealthCheck</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.2</version>
<configuration>
<!--soapUI project file location-->
<projectFile>Regression-soapui-project.xml</projectFile>
<!--output file location-->
<outputFolder>${basedir}/target/surefire-reports</outputFolder>
<!--junit results file-->
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<printReport>true</printReport>
</configuration>
<executions>
<execution>
<id>soapUI</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</reporting>
</project>

 

Commands I am using to Run this pom file:

 

# Run tests and generate .xml reports

mvn com.smartbear.soapui:soapui-maven-plugin:5.1.2:test

 

# Convert .xml reports into .html report, but without the CSS or images

mvn surefire-report:report-only

 

# Put the CSS and images where they need to be without the rest of the

# time-consuming stuff

mvn site -DgenerateReports=false

 

When I executed these 3 commands I can see HTML report is generated( I had only 1 test case in this suite).

But even though one of the assertion in test step failed, it says test case passed.

 

Also, I made setting to abort execution if test step fails it still executes it from command prompt with above commands. It works fine in Ready API.

 

Can someone please help me on this?

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    With the available information, it is impossible to offer any help.
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor

    rohitvarsha12,

    do you have the problem with other soapui project? have you been able to run a soapui project without such an error?

     

    • rohitvarsha12's avatar
      rohitvarsha12
      Contributor

      Yes. For all projects i am getting same issue.

       

      Can someone please help me to list down steps to configure to run from Jenkin.

      (Note: Please don't point to SOAP UI Documentation -- its not helping at all)