Forum Discussion

srahul101082's avatar
srahul101082
Occasional Contributor
10 years ago

Configuring Log file Location for SoapUi-Maven project

Hello Team,

In my Soapui-Maven project , log files like global-groovy.log, soapui.log and soapui-errors.log gets generated in the base directory of the project, I want to configure the log file location for all such type log files mentioned above.
Please guide me on the same




Below is my pom.xml


<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:\someDirectory\GamePlayService\bin\ext</value>
</property>
</soapuiProperties>
</configuration>
<executions>
<execution>
<id>soap-webservice-test</id>
<phase>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>

2 Replies

  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi srahul101082 and SmartBear Support,
    in addition, notice that as you are using version 4.6.1, the groovy-log.log file will still be stored in the base directory. This is because of a bug in SoapUI, the bug has been fixed in 5.0.0 (bug exist at least from 3.6.1 to 4.6.4)

    If you can not ugrade to 5.0.0, you have the following workarounds
    * define a custom log4j configuration file in the base directory or in a specific location (need extra conf)
    * use maven-soapui-extension-plugin (my custom implementation of the plugin, not supported by SmartBear) which has not the bug for SoapUI 4.6.1 and which also store all log files in ${project.build.directory}/soapui/logs by default

    You can find detailled information about log configuration for both SmartBear and my implementation here: https://github.com/redfish4ktc/maven-so ... figuration