Forum Discussion

arghvark's avatar
arghvark
New Contributor
11 years ago

how do I get response time in a spreadsheet output step?

I want to report the time it took to execute the request that I sent.  I have a Spreadsheet Input step that provides the data for requests, and a Spreadsheet output step that takes the response values and puts them into a spreadsheet for later analysis.  I would like to output the time it took to execute the request along with the other data. 

 

I've found the following line for getting the value:

 

testRunner.testCase.testSteps["requestName"].testRequest.response.timeTaken

 

I thought that, since I was inside the testCase already, perhaps I could use the following as the value of a property in the SpreadSheet output step:

 

${testSteps["evidenceVerificationRequest"].testReqest.response.timeTaken}

 

Is this right?  And how do I connect that property with a column on the spreadsheet itself?

 

thanks

1 Reply

  • Try this

     

    1. create an Excel DataSink and define a property as timeTaken

    2. give the Property value as 

        ${=testRunner.testCase.testSteps['evidenceVerificationRequest'].testRequest.response.timeTaken}

    3. run DataSink test step, verify whether timeTaken field gets populated with the right value

    4. Open the Out File and verify whether same data is displayed in the spreadsheet as well.

     

    Good Luck!

     

    Regards,

    Gilu Gopi