Forum Discussion

ahmedzuhaib83's avatar
5 years ago

Mark build as unstable rather than Fail in Jenkins for SoapUI tests

Hi Everyone,

 

I have a maven job configured using SoapUI maven plugin(5.4.0) over Jenkins, the problem is even when one test case fails, build is marked as "Failure" instead of "Unstable". I want it to be unstable when test cases fail and only mark build Fail when it cannot execute the tests for some other reason.

 

Here is the POM file:

<?xml version="1.0" encoding="UTF-8"?> 
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>My_JOB</groupId>
<artifactId>My_JOB</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>NAME_OF_MY_JOB</name>
<url>URLOFMYJOB</url>

<build>
    <plugins>
        <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-maven-plugin</artifactId>
            <version>5.4.0</version>
            <configuration>
                <projectFile>My_JOB.xml</projectFile>
                <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
                <junitReport>true</junitReport>
                <exportAll>true</exportAll>
                <printReport>true</printReport>
                                        <soapuiProperties>
                                                <property>
                                                        <name>soapui.logroot</name>
                                                        <value>${project.build.directory}/soapui-logs/</value>
                                                </property>
                                                <property>
                                                        <name>soapui.home</name>
                                                        <value>/mnt/Tools/SoapUI54</value>
                                                </property>
                                        </soapuiProperties>
            </configuration>

            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
	<dependencies>
		<dependency>
		        <groupId>com.jgoodies</groupId>
		        <artifactId>jgoodies-forms</artifactId>
		        <version>1.9.0</version>
		</dependency>
	</dependencies>
        </plugin>
    </plugins>
</build>

<reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
                <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
          <showSuccess>true</showSuccess>
        </configuration>
      </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jxr-plugin</artifactId>
            <version>2.3</version>
        </plugin>
    </plugins>
</reporting>
</project>

 

I've been searching for this but couldn't find any solution which could help.

 

No RepliesBe the first to reply