Forum Discussion
nmrao
9 years agoChampion Level 3
You may use Events, Submit Listener before and after submit to log the time.
- rayapudi9049 years agoOccasional Contributor
I have tried using events but no luck. Could you please provide some sample.
Thanks,
Rajesh
- nmrao9 years agoChampion Level 3Please show what you tried, so that it can be corrected.
- 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)