Hi,
The function returns the time elapsed in milliseconds testrunner has been running.
I ran the following code in a Groovy test step:
log.info "testRunner.timeTaken = ${testRunner.timeTaken}";
while (true)
{
if(testRunner.timeTaken > 20 * 60 * 1000) {
testRunner.fail("${context.testCase.name} too long to find valid current issue!");
break;
}
}
log.info "testRunner.timeTaken = ${testRunner.timeTaken}";
log.info "done";
This was logged:
Wed Mar 12 14:06:45 EDT 2014:INFO:testRunner.timeTaken = 170
Wed Mar 12 14:26:45 EDT 2014:ERROR:Failed with reason [base64_encode_decode too long to find valid current issue!]
Wed Mar 12 14:26:45 EDT 2014:INFO:testRunner.timeTaken =
1200017Wed Mar 12 14:26:45 EDT 2014:INFO:done
1200017 in milliseconds is 20 minutes which is how long testrunner is suppose to run before failing.
Regards,
Marcus
SmartBear Support