Abhishek Yadav
Abhishek Yadav

Reputation: 362

How to generate new txt file with a timestamp in groovy and SoapUI?

I am trying to write a groovy script to generate custom logs in SOAP UI. I want the logs to be in a certain format for post-analysis that's why I don't want to rely on internal logs if present in SOAPUI.

Everytime I run a new test suite, I want to log some custom logs to a new text file. How can I achieve this in groovy?

I also want to call the test suites from a CI like jenkins and automate it to run after every 1 hour. How can I run the test suites in Jenkins? Should I write a batch file or is is there any other way present in SOAPUI?

Upvotes: 0

Views: 787

Answers (1)

daggett
daggett

Reputation: 28624

you can setup custom log file with specific format in the SOAPUI/bin/soapui-log4j.xml and define there a filter what should appear in it

look for different log4j config examples over the internet

so in groovy you can continue just calling log.info(...)

you can run your tests from command line using SOAPUI/bin/testrunner tool

Upvotes: 1

Related Questions