Forum Discussion

srahul101082's avatar
srahul101082
Occasional Contributor
11 years ago

[Res]JunitReport are not getting generated

Hello Team,

Let me give some background first, I have soapui project, trying to build the same using maven, my pom.xml looks like this
<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>com.aristocrat.NCube_Regression</groupId>
<artifactId>GamePlayService</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>GamePlayService</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>4.6.1</version>

<configuration>
<projectFile>${basedir}/GamePlayService-soapui-project.xml</projectFile>
<outputFolder>${basedir}/target/soapui</outputFolder>
<junitReport>true</junitReport>
<exportwAll>true</exportwAll>
<printReport>true</printReport>
<soapuiProperties>
<property>
<name>soapui.ext.libraries</name>
<value>C:\res_test_maven\GamePlayService\bin\ext</value>
</property>
</soapuiProperties>
</configuration>
<executions>
<execution>
<id>soap-webservice-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/soapui</directory>
</fileset>
<fileset>
<directory>${basedir}/soapui-errors</directory>
</fileset>
<fileset>
<directory>${basedir}/global-groovy</directory>
</fileset>
</filesets>
</configuration>
<executions>
<execution>
<phase>clean</phase>
</execution>
</executions>
</plugin>
</plugins>

</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<outputDirectory>target/site/soapui</outputDirectory>
<reportsDirectories>
<reportsDirectories>target/soapui/</reportsDirectories>
</reportsDirectories>
</configuration>
</plugin>
</plugins>
</reporting>
</project>

On executing below command
"mvn com.smartbear.soapui:soapui-maven-plugin:4.6.1:test"
,it does not creates the target(specified as target directory in reporting plugin of pom.xml) folder and reports are not getting generated.
Also on executing "mvn test" it says


[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GamePlayService 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ GamePlayService ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\res_test_maven\GamePlayService\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ GamePlayService ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ GamePlayService ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\res_test_maven\GamePlayService\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ GamePlayService ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ GamePlayService ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.071s
[INFO] Finished at: Tue Apr 15 17:28:52 IST 2014
[INFO] Final Memory: 5M/153M
[INFO] ------------------------------------------------------------------------
C:\res_test_maven\GamePlayService>

Please shed some light on how to generate Junit report, when the project is build using maven.


Many Thanks
Rahul Singh

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    You need to create an ext folder under your project and add your dependencies there. Let me know if you are still having issues.

    Regards,
    Temil
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi srahul101082,

    When executing "mvn test", this is normal to not see any soapui tests runned. In your pom, you have configure to run these test during the integration-test phase which occur later than the test phase in the maven default lifecycle (https://maven.apache.org/guides/introdu ... _Reference). To run your test, run mvn integration-test for instance or modify your pom to bind the soapui execution to the test phase

    There is a typo in your plugin configuration, instead of exportwAll, use exportAll. If this parameter is not correclty set or set to false, detailled request/responses messages are only generated for tests that have failures

    About "mvn com.smartbear.soapui:soapui-maven-plugin:4.6.1:test", I don't understand which folder is not generated. you mean soapui tests are runned but no junit xml files are generated?