0

I need to create a log file from a SOAPUI load test that shows the threadcount at 1-second intervals. The file needs only a timestamp and the threadcount, and can be CSV or any other format really. I can't see a way to get just this info from the predefined log files.

Is a Groovy script step the right way to do this? How would I write it? I could have a test case that does nothing but writes the log message every second while the "real" cases are running concurrently, but I don't know how to write that simple bit of script. I find the documentation almost impenetrable.

Thanks in advance!

user1058785
  • 41
  • 2
  • 4

1 Answers1

3

This runs faster than once per second. If it works for you I can explain how to cut the time down:

if (context.LoadTestContext != null)
{
    log.info("threads = " + testRunner.getRunContext().LoadTestRunner.getRunningThreadCount() )
}

(It is a Groovy script)

By the way, load test script logging is off by default in SoapUI. You need to go to Preferences, UI Settings & check the "Do not disable the groovy log when running load tests" checkbox.

chrismead
  • 2,163
  • 3
  • 24
  • 36