I am executing a test suite over the cloud. Often times, my tests are failed due to slow or unstable network connection? How do I handle such scenarios?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

3 Answers

answered by (428 points)
+2 votes
An automation testing company always recommends to execute the tests on a stable environment. Otherwise, the automation engineer have to put extra effort in reviewing the failure logs and scrips.
This becomes a time consuming task and increases the fixing cost as well.
If your network is slow, then you should implement appropriate Wait in your automated tests. This would allow the application to respond even when the network is slow or the page is taking time to load.
So, you can use Explicit and Implicit Waits in your Selenium tests to avoid any failure due to network issue.
answered by (202 points)
0 votes
We usually recommend using WebDriver wait to wait for an element.

Apart from that, you can get a list of failed tests and you can execute those. You can get the list of failed tests through your runner like TestNG or JUnit.

But, the ideal way is to make sure that your network and the system are stable.
answered by (34 points)
0 votes
Use TestNG, Jenkins