Forum Discussion

phanisrikar's avatar
phanisrikar
Contributor
14 years ago

Does teardown script of test case executes during loadtest ?

Hi,

I have executed a test case with 5 steps, and in teardown of the test cases I have included a simple script to get the test step names, status and their request and reponse and added to the test case properties.

Now when I load test the scenario, ideally I need to get the request and response strings in the table log. but I am unable to get the data to the Tablelog component and instead "<discarded>" is getting filled in the table log for those parameters.

Is there any other way to get the request and response xmls into table log.

first of all, do the teardown script executes for each virtual user ?

Thanks,
Phani

3 Replies

  • naveen1's avatar
    naveen1
    New Contributor
    Hi Phani,

    I've just started learning soapUI and I'm writing TearDown script for exporting the test result to excel sheet. I've successfully exported the test case name and status to an excel sheet. But I've to export the test step names and status also.
    Could you please share the script for getting the "test step names, and status"?

    Regards,
    Naveen
  • naveen1 wrote:
    Hi Phani,

    I've just started learning soapUI and I'm writing TearDown script for exporting the test result to excel sheet. I've successfully exported the test case name and status to an excel sheet. But I've to export the test step names and status also.
    Could you please share the script for getting the "test step names, and status"?

    Regards,
    Naveen

    Hi!

    Is this question related to loadUI or just soapUI? This is the loadUI subforum.

    Regards

    Henrik
    SmartBear Software
  • Sorry Henrik to post the reply to the soapui question in this forum

    Naveen,

    teardown script to get the status of each step based on the test step class.

    def results = testRunner.getResults()
    //log.info results.Count()
    for (result in results) {
    //log.info result.testStep.class - to get the test step class
    //log.info result.testStep.name - to get the test step name
    if (result.testStep.class == com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep) {
    log.info "Step Name : "+result.testStep.name+ " Status : "+ result.getStatus()
    }
    }


    Please post the questions related to soapui in soapui subforum

    Thanks & Regards,
    Phani