Forum Discussion

rohitgkk's avatar
rohitgkk
Contributor
14 years ago

How to export soapUI logs using groovy script?

Hi,

I am planning to export the soapUI logs using groovy script does anyone know the API's to access the same?

Regards,
Rohit
  • deepesh_jain's avatar
    deepesh_jain
    Frequent Contributor
    Hi Rohit,

    Are you planning to export all logs generated by soapui or just the log.info commands in your groovy script to an external file? In either case you would have to play around with soapui-log4j.xml. For the first case, i believe it already does take everything in an external file, the details of which you can find in soapui-log4j.xml in the bin folder.

    For the latter one, modification of soapui-log4j.xml is required.

    Let me know if you need more information.

    Regards,
    Deepesh Jain
  • Hi Deepesh,

    Thanks for your response.

    Yes, I know that I need to do some work around with soapui-log4j.xml but I don't want to change it's settings and also the path of soapui.log file by default it will be generated in soapui/bin.

    Once I change soapui-log4j.xml settings, changes will be affected to all the soapUI projects instead I am planning to write a groovy script which will export the soapUI log (Only from the specified line of the soapui.log) and place it into some location and this groovy script will be part of some test cases which will run once all the other test steps completes it's execution.

    Something like viewtopic.php?f=2&t=66 but the script mentioned here is not working for me with the soapUI version 3.6.1 (not pro version ) probably it will work only for pro versions.

    Regards,
    Rohit