Forum Discussion
- tjdurdenFrequent ContributorHave a look at http://pradeepbishnoi.blogspot.co.uk/20 ... -size.html
Specifically:
log.info("Response Time :" + messageExchange.getTimeTaken())
log.info("Request Size :" + messageExchange.requestContent.size())
log.info("Response Size :" + messageExchange.responseContent.size()) - martinemNew ContributorBut how to access messageExchange object in mock's AfterRequest?
- pflaumengeistContributorif you have a setup like the one in the image.
script in testcase.1
runner = testRunner.testCase.testSuite.getTestCaseByName('testcase.2').run(null, false)
log.info(runner.getTimeTaken() + 'ms')
script in testcase.2
import java.util.Random
rand = new Random()
sleep(rand.nextInt(10000))