While running tests there can be cases where certain tests get stuck or may take much more time than expected. In such a case you may need to mark the said test case as fail and then continue. TestNG allows user to configure a time period to wait for a test to completely execute. This can be configured in two ways:
Let's go ahead and create a sample project to see how this feature works.