How to calculate test case run time

//Add to the import section of  your test case or use “CTRL+SHIFT+O” to have Katalon add it for you.
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

//Add to the body of test case
int startTime = System.currentTimeMillis()
//Test steps would go here...
Thread.sleep(10000) //For demo purposes
int endTime = System.currentTimeMillis()
int RunTime =  endTime - startTime
println('Runtime seconds: ' + ((RunTime) / 1000))
println('Runtime minutes: ' + ((RunTime) / 60000))

4 Likes