How do you validate the response time?

Try Apach Commons Lang 3 StopWatch.

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import java.util.concurrent.TimeUnit

import org.apache.commons.lang3.time.StopWatch

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('')

// create a started stopwatch
StopWatch stopWatch = StopWatch.createStarted()

WebUI.navigateToUrl('https://katalon-demo-cura.herokuapp.com/')

WebUI.verifyElementPresent(findTestObject('Object Repository/Page_CURA Healthcare Service/a_Make Appointment'), 10)

// stop the stopwatch
stopWatch.stop()

WebUI.closeBrowser()

println("${stopWatch.getTime(TimeUnit.MILLISECONDS) / 1000} seconds")

2 Likes