Test automation done right can reduce labor, lower human errors, and speed up delivery. However, too often automation projects don’t live up to their promised benefits. In this webinar, we will review common reasons why test automation fails and offer some design and implementation tips to get your projects back on track.
We covered:
- Common test automation failures
- How to design your E2E tests
- Tips to help ensure project success
Watch the recording here:
Here are a couple questions we received.
Q: “How to handle test fail because ajax page load slow down?
A: It depends…
Is there ANY UI indication that something is going on?
If there is then I would sync on “object exists” or “object does not exist” based on whether some object or data displays after the call or if some loading message appears or the object that triggers the AJAX call goes away when the call is done.
If there are only a finite number of places in your test this can occur then you can just add this type of synchronization at those places
However, If AJAX calls are all over then a before and/or after function needs to be used that does the logic above.
If not then you need to look at the network traffic from the call and find something that you can sync on.
Q: How to ensure that test is working properly but some it does not work may be an issue with element click not working”
A: Unfortunately, there is no silver bullet for things like this. The best you can do is minimize the chance of this happening. If the element is not found then the test should fail and alert you to the fact that the element was not found. If the wrong element is found then it is harder as the action passes and a later validation step fails. This is where it is important to have a tool that is best at finding objects. You can try modularizing your test cases to single pages with validation to validate actions that have occurred. If playback is using events then it is trickier as the click event may not do anything. I would recommend physical playback that will reduce the risk of the event not being executed as the mouse and keyboard inputs are interacting with the target object.