Forum Discussion

vikingsteve's avatar
vikingsteve
Occasional Contributor
13 years ago

Maven-soapui-plugin, setting to reduce log-level?

Hello,

Is there a setting for the maven-soapui-plugin to reduce the log-level? I'd prefer to see the INFO lines, without DEBUG.

10:35:09,481 INFO [SoapUIProTestCaseRunner] Running Project [FooService], runType = SEQUENTIAL
10:35:09,491 INFO [SoapUIProTestCaseRunner] Running soapUI testcase [findFoo]
10:35:09,498 INFO [SoapUIProTestCaseRunner] running step [findFoo_ValidParameters_DataExists_FooId]
10:35:09,693 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
10:35:09,693 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /FooService/FooService HTTP/1.1
10:35:09,833 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
10:35:09,849 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection shut down
10:35:10,163 INFO [SoapUIProTestCaseRunner] Assertion [SOAP Response] has status VALID
10:35:10,163 INFO [SoapUIProTestCaseRunner] Assertion [XPath Match] has status VALID

In maven I can see some settings like this one, below.

<soapuiProperties>
<property>
<name>soapui.logroot</name>
<value>${project.build.directory}\soapui-logs\</value>
</property>
</soapuiProperties>

So I was wondering if log level is configurable without unzipping the plugin and editting the log4j.xml
  • vikingsteve's avatar
    vikingsteve
    Occasional Contributor
    Sweet! Works a dream. Thanks.

    08:37:24,528 INFO [SoapUIProTestCaseRunner] running step [searchForEmployee_NoParameters]
    08:37:24,681 INFO [SoapUIProTestCaseRunner] Assertion [SOAP Response] has status VALID
    08:37:24,681 INFO [SoapUIProTestCaseRunner] Assertion [XPath Match] has status VALID
    08:37:24,681 INFO [SoapUIProTestCaseRunner] Assertion [XPath Match NoFault] has status VALID
  • vikingsteve's avatar
    vikingsteve
    Occasional Contributor
    plus one more question redfish - is it possible to override where the soapui-log4j.xml file is located (e.g. src/test/resources), and specify that to the plugin?
  • vikingsteve's avatar
    vikingsteve
    Occasional Contributor
    Thanks again buddy!!

    And yes, it worked perfectly. For your reference, here is my maven execution configured under a maven profile named 'soapuitests':

    <profiles>
    <profile>
    <id>soapuitests</id>
    <build>
    <plugins>
    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-pro-plugin</artifactId>
    <version>4.5.1</version>
    <executions>

    <execution>
    <id>soapui-tests-in-test</id>
    <phase>test</phase>
    <goals>
    <goal>test</goal>
    </goals>
    <configuration>
    <endpoint>http://myserver.com/MyService/MyService</endpoint>
    <projectFile>${project.basedir}/src/test/resources/MyService-soapui-project.xml</projectFile>
    <projectProperties>
    <value>Username=abc</value>
    <value>Password=123</value>
    </projectProperties>
    <outputFolder>${project.build.directory}\soapui-logs\test</outputFolder>
    <soapuiProperties>
    <property>
    <name>soapui.log4j.config</name>
    <value>${basedir}\src\test\resources\soapui-log4j.xml</value>
    </property>
    <property>
    <name>soapui.logroot</name>
    <value>${project.build.directory}\soapui-logs\</value>
    </property>
    </soapuiProperties>
    </configuration>
    </execution>

    </executions>
    </plugin>
    </plugins>
    </build>
    </profile>
    </profiles>


    Additionally, I was able to add several almost identical executions with different id's, to run my same TestSuite versus different servers.

    So, I have executions for:


    <execution>
    <id>soapui-tests-on-server1</id>
    ...
    <outputFolder>${project.build.directory}\soapui-logs\server1</outputFolder>


    and


    <execution>
    <id>soapui-tests-on-server2</id>
    ...
    <outputFolder>${project.build.directory}\soapui-logs\server2</outputFolder>


    and


    <execution>
    <id>soapui-tests-on-server3</id>
    ...
    <outputFolder>${project.build.directory}\soapui-logs\server3</outputFolder>


    Maven is an amazing automation tool for running soapui. Thanks for making this plugin happen!

    And finally, in soapui-log4j.xml, which I placed in src/test/resources, I put the logging level to INFO:


    <logger name="com.eviware.soapui">
    <level value="INFO" />
    </logger>