Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

What does the test timeOut mean in TestNG?

The timeOut attribute in TestNG is used to determine the maximum time permitted for a test method to execute. If the test method takes longer than the given time, TestNG will label it as a failed test and terminate the execution. The value of the timeout attribute defines in milliseconds. For example, if you put the value of 5000 with the timeOut attribute test will end if it prolongs more than 5000 milliseconds or 5 seconds.

Here is an example of a timeOut attribute:

@Test(timeOut = 5000)
public void testMethod() {
  // test method code goes here

Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS


24/7 support


Enterprise grade security


Fastest test execution cloud