Forum Discussion

chikki78's avatar
chikki78
Occasional Contributor
6 years ago

In correct testcases count when executed from maven

Hi ,  

When i executed the test from maven i am getting incorrect testcases count.

Command line:

mvn clean install -DskipTests -Dend.point=QA --fail-at-end

POM.XML:

<?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>

<parent>
<groupId>com.abc.GPIL</groupId>
<artifactId>abc-MVNB-MVN</artifactId>
<version>1.0</version>
</parent>

<groupId>com.smartbear.samples.ready-api-maven-plugin</groupId>
<artifactId>MVNB-Project-MVN</artifactId>
<packaging>jar</packaging>
<version>1.1</version>
<name>Project</name>
<url>http://maven.apache.org</url>

<repositories>

<repository>
<id>repository.jboss.org-public</id>
<name>JBoss.org Maven repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public</url>
</repository>

<repository>
<id>SmartBear Sweden Repository</id>
<url>http://smartbearsoftware.com/repository/maven2</url>
</repository>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://java.net/projects/maven-repository/</url>
<layout>default</layout>
</repository>
<repository>
<id>eviwareRepository</id>
<url>http://smartbearsoftware.com/repository/maven2</url>
</repository>

</repositories>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<end.point></end.point>
<!-- ${soapui.testserver.param} -->

</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>


<pluginRepositories>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://smartbearsoftware.com/repository/maven2</url>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>

<plugin>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>1.9.0</version>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<executions>
<execution>

<id>PISCASH134</id>
<phase>test-compile</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${soap.project.dir}\project\soapui-project.xml</projectFile>
<outputFolder>${project.basedir}\target\surefire-reports</outputFolder>
<junitReport>true</junitReport>
<testFailureIgnore>true</testFailureIgnore>
<printReport>true</printReport>
<environment>${end.point}</environment>
</configuration>
</execution>

</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<parallel>methods</parallel>
<threadcount>9</threadcount>
<testFailureIgnore>true</testFailureIgnore>
<!-- <forkcount>9</forkcount> <reuseForks>true</reuseForks> -->
</configuration>

</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.0</version>

</plugin>
</plugins>
</reporting>

</project>

 Sure fire reportsActual Report which showing in correct resultsExpected ResultsTest cases format are call a test(reusable)