Forum Discussion

Pitney_Bowes_CT's avatar
Pitney_Bowes_CT
New Contributor
12 years ago

[Resolved] Changing loadtestrunner logging

Hi,

I'm trying to figure out how to change the logging while running loadtestrunner.bat. I've tried changing all of the values in the ..\soapui\bin\soapui-log4j.xml to ERROR but still see DEBUG level logging in the DOS command window and INFO level in the soapui.log and global-groovy.log files. I even tried the following soapui-log4j.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<root>
<priority value="OFF" />
</root>
</log4j:configuration>

...but still received all messages.

Please advise how to change the logging so that only ERROR levels are reported.

Thanks

6 Replies

  • More information:

    When I run LoadTestRunner from within soapUI, I do see the log4j changes. I notice in the LoadTestRunner window that it shows a line for configuring the log4j settings.

    "Running soapUI LoadTestRunner for [myproject]
    directory: C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin
    command: cmd.exe /C loadtestrunner.bat -sOrders -c"Create Order" -l"LoadTest for Case 5" -fC:\Reports -E"Local machine" C:\myproject.xml
    soapUI Pro 4.5.1 LoadTest Runner
    Configuring log4j from [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\soapui-log4j.xml]
    Progress: 1 - Creating Virtual User 1
    Progress: 1 - Started thread 1"

    Maybe I need to specify an option in my batch file that I'm using when running from a command prompt?

    Thanks.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    Hmm... I tried to reproduce this myself, but changing the log level to ERROR worked fine for me both for the testrunner.bat and the loadtestrunner.bat

    No, you shouldn't have to specify any specific parameter to get this working.

    Are you sure that your changes has been saved correctly? There's might be a problem with the file permissions?

    --
    Regards

    Erik
    SmartBear Sweden
  • Hi,

    Thanks for your reply. Changes are definitely saved (I did have to change the permissions to be able to edit anything). Note that I only see the problem when running loadtestrunner.bat from a command prompt. I'm testing with soapUI not running if that matters. Please confirm that this is what you're doing. I've attached my batch file that I double-click on to kick it off. (I modified the paths for simplicity and changed the extension from BAT to TXT.)

    Thanks,
    Steve
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    I've tried running the loadtestrunner as well, but couldn't reproduce this.
    Could you please send us your full soapui-log4j.xml file?

    --
    Regards

    Erik
    SmartBear Sweden
  • My problem was that the batch file I was running wasn't in the soapUI bin folder. e.g. c:\work\myproject instead of the ..\soapUI-Pro-4.5.1\bin. The batch file runs but the logging settings didn't seem to be honored.

    After adding a change directory to the bin folder in my batch file:

    e.g.
    cd C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin
    loadtestrunner.bat -sOrders -c"Create Order" -l"LoadTest for Case 5" -fC:\Reports -E"Local machine" C:\myproject.xml

    instead of just

    loadtestrunner.bat -sOrders -c"Create Order" -l"LoadTest for Case 5" -fC:\Reports -E"Local machine" C:\myproject.xml

    ...the logging settings are used properly. Because loadtestrunner.bat was in the PATH, I expected it to run the same way wherever it was called.

    Thanks for your help.

    Steve
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Ah!

    You are right. Thanks for making this clear.

    --
    Regards
    Erik, SmartBear Support