Forum Discussion
- omatzuraSuper ContributorHi!
sorry, I make this mistake all the time.. it should have been
log.info "Time taken" + testRunner.testCase.testSteps["Request 1"].testRequest.response.timeTaken
Hope that works better..
regards!
/Ole
eviware.com - omatzuraSuper ContributorHi!
sure, use the contentLength property
def size = testRunner.testCase.testSteps["Request 1"].testRequest.response.contentLength
...
regards,
/Ole
eviware.com - SmartBear_SuppoSmartBear Alumni (Retired)The size discrepancy most likely arises due to the way that your operating system saves files to the disk, as well as the way it reports the sizes.
/Nenad
http://eviware.com - SmartBear_SuppoSmartBear Alumni (Retired)Hello,
We have the JavaDoc API for all our classes available here (soapUI) and here (soapUI Pro).
When working with Groovy you can generally write things as in Java, but if you want to you can take advantage of a bunch of Groovy features which can make the code a lot more readable and concise. For example:
testRunner.testCase.testSteps["Request 1"].testRequest.response.timeTaken
would be written as the following in Java:
testRunner.getTestCase().getTestSteps().get("Request 1").getTestRequest().getResponse().getTimeTaken();
Good luck!
Regards,
Dain
eviware.com - omatzuraSuper ContributorHi Ali,
easiest is probably
log.info "Time taken" + testRunner.testCase.testSteps["Request 1"].response.timeTaken
does that work ok?
/Ole
eviware.com - alibaba82Super ContributorOle,
I am getting the following error
Fri Nov 07 11:57:57 PST 2008:ERROR:groovy.lang.MissingPropertyException: No such property: response for class: com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep - alibaba82Super Contributorcan you also tell me how to output the size of the response.
Thanks
Ali - ATokeleyContributorhey guys, how do I go about outputting the byte size of the response?
- SmartBear_SuppoSmartBear Alumni (Retired)Hi!
Try getting get the size of the entire response with
log.info "Full Response size (in bytes) " + testRunner.testCase.testSteps["Request 1"].testRequest.response.rawResponseData.length
regards,
/Ole
eviware.com - ATokeleyContributorThanks for this Ole. It seems to work. Just wondering, if you have an opinion on what is happening when I save the response to a file.
The response size in soap is :160307 bytes
The response size once saved to file is 169KB
Any idea on the size discrepancy?
Cheers,
- Richard
Related Content
Recent Discussions
- 2 days ago
- 9 days ago