Forum Discussion

JustinM89's avatar
JustinM89
Contributor
7 years ago
Solved

Suppress logging from SoapUIProTestCaseRunner class when running tests command line

Hi all, when running tests using testRunner.bat, the output that is generated contains hundreds and hundreds of lines from a SoapUIProTestCaseRunner class:

 

10:00:56,116 INFO  [SoapUIProTestCaseRunner] Setting project property [contextRoot] to [myServer.foo.bar:12345]
10:00:56,117 INFO  [SoapUIProTestCaseRunner] Running tests in the project [My REST Project]
10:00:56,121 INFO  [SoapUIProTestCaseRunner] Running TestSuite [My-Test-Suite], runType = SEQUENTIAL
10:00:56,193 INFO  [SoapUIProTestCaseRunner] Running TestCase [Some-Report
10:00:56,456 INFO  [SoapUIProTestCaseRunner] running step [Login]
10:00:57,010 INFO  [SoapUIProTestCaseRunner] Running TestCase [Login]
10:00:57,018 INFO  [SoapUIProTestCaseRunner] running step [Encrypt password]

It is logging just about every single thing it does. This is great and all, but it is way, way too granular for the feedback we're trying to receive. When something errors, it's nearly impossible to track it down among all of these other entries.

 

Is there a way to disable or suppress the messages coming from this class? I've been poking around in the soapui-log4j.xml, but I'm also having trouble finding this class. I've checked both the core and pro API docs, and SoapUIProTestCaseRunner does not appear as a class in either one, so I'm not really sure how I can add this class to the log4j if I don't know where it is.

 

  • Wow, I must be blind. I decided to give it one more Google search before moving onto something else, and found the class here. Don't know why I couldn't find this in the other 2 API docs I checked, but this appears to be the correct class.

     

    For anyone else that is wondering, I simply added a new logger to the soapui-log4j.xml file:

     

    <logger name="com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner">
        <level value="ERROR"/>
        <appender-ref ref="ERRORFILE"/>
    </logger>

    Obviously, you'll probably want to change the level and appender, but this was just a quick test to confirm that it did not log the output to the console.

8 Replies

  • Wow, I must be blind. I decided to give it one more Google search before moving onto something else, and found the class here. Don't know why I couldn't find this in the other 2 API docs I checked, but this appears to be the correct class.

     

    For anyone else that is wondering, I simply added a new logger to the soapui-log4j.xml file:

     

    <logger name="com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner">
        <level value="ERROR"/>
        <appender-ref ref="ERRORFILE"/>
    </logger>

    Obviously, you'll probably want to change the level and appender, but this was just a quick test to confirm that it did not log the output to the console.

    • sanj's avatar
      sanj
      Super Contributor

      Now to complete it you may want to indicate where this xml logger file is?

      I searched both the install location and where user profile info for ready api is

      I could not find soapui-log4j.xml

      • JustinM89's avatar
        JustinM89
        Contributor

        Using ReadyAPI-2.0.2, my soapui-log4j.xml is in my %READYAPI_HOME%\bin directory