Forum Discussion

soapLoadUser's avatar
soapLoadUser
Occasional Contributor
13 years ago

How to do some work after each test case run of a load test?

Hi,

I need to do some work after each test case run of a load test.
I created a test case and at first tested it using a soapUI load test. The test case uses a LoadTestRunListener.afterTestCase event handler to do some logic after a test case run has finished, and this works.
Unfortunately this event handler seems not to be run when running the test case in a loadUI project.

How can I get this to work? I'm using loadUI 1.5.0 and soapUI 4.0.1 Pro.

Thanks,
soapLoadUser

3 Replies

  • soapLoadUser's avatar
    soapLoadUser
    Occasional Contributor
    Hi again,

    can anybody help me with this issue please? It keeps me from working on this part of my tests.

    Many thanks!
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    The LoadTestRunListeners are not executed by loadUI as they are specific to soapUI LoadTests.

    What problem do you want to solve? I.e. what do you want to achieve? Maybe there's some other way...

    Henrik
    SmartBear Software
  • soapLoadUser's avatar
    soapLoadUser
    Occasional Contributor
    Hi Henrik,

    I want to write some data related to the test case run into a file. These are technical data like timestamps of some test steps and an identifier of the test case run as well as business related data related to SOAP requests (there are several SOAP requests in the test case). Maybe the SOAP response should be logged, too, if there was a failure, but maybe these failures will be logged separately after the according test step has finished.

    A test case run should be stopped if one of the test steps is a failure, to avoid subsequent errors.
    Therefore I cannot just use a Groovy test step instead of an event handler.
    However, I see a possibility how this can be done: I could configure the test case run to continue after failures and I would have to use "gotos" to skip test steps if a failure has occurred. The target test step of the gotos would be e.g. the last one, where all the logging would be done. This would not be very understandable and I don't especially like this idea.

    Do you have another suggestion?

    By the way: Are the "TestRunListener" events, e.g. "afterStep" usable with loadUI? These could be used for logging the failures after the according test step as I described above.

    Thanks and regards
    soapLoadUser