Forum Discussion
I have tried using events but no luck. Could you please provide some sample.
Thanks,
Rajesh
- rayapudi9049 years agoOccasional Contributor
Hi Rao,
Please find the below sample
Event : TestRunListener.afterStep
def step = testStepResult.testStep.name
log.info stepdef stamp = testStepResult.timeStamp
def timeTaken = testStepResult.timeTakentestRunner.testCase.getProperty("TimeStamp").setValue(stamp)
testRunner.testCase.getProperty("TimeTaken").setValue(timeTaken)- nmrao9 years agoChampion Level 3
In fact, below gives what you looking for even without using events. Use it in Script Assertion
log.info messageExchange.response.timeTaken
Does it solves?
- rayapudi9049 years agoOccasional Contributor
Whe ni use the below event
Event : TestRunListener.afterStep
def step = testStepResult.testStep.name
log.info stepdef stamp = testStepResult.timeStamp
def timeTaken = testStepResult.timeTakentestRunner.testCase.getProperty("TimeStamp").setValue(stamp)
testRunner.testCase.getProperty("TimeTaken").setValue(timeTaken)It is not capturing any data in the property.
Using the log.info messageExchange.response.timeTaken i can print the values in log file, but how to capture in ay of the property which in turn using data sink i can pass it to output file.
I am using Ready API 1.3.1 version. Please advice
- nmrao9 years agoChampion Level 3So, what is the issue with above script?