Elapsed time in test listener

Is it possible to get the elapsed time for use in the test listener?

You can by using some Groovy scripts. Below code is how you generate your elapsed time between ‘start’ and ‘stop’ time:

import groovy.time.TimeCategory 
import groovy.time.TimeDuration
Date start = new Date()
Date stop = new Date()
TimeDuration td = TimeCategory.minus( stop, start )
println td

Yes but i’m wondering if we can use the elapsed time which Katalon already has implemented for use in reporting.

1 Like

Hey Vinh Do you know if is possible to check if the TimeDuration is equal to a certain number of seconds?