The End-to-End GUI tests are cursed the most because of the time it takes to execute them. With cloud infrastructure enabling processing power and parallel tests execution, the tool vendors are providing better execution times, but the responsibility of better design of automation suite lies with us. When I say ‘us’, it could be the Software Testing folks or the development folks (that’s a topic for another day!).
Dennis Martinez wrote a beautiful piece on 5 Ways to Speed up Your End-to-End Tests, which I enjoyed. The article was pretty comprehensive and covered the salient points. There are some additional things (which may or may not add up to increasing the speed depending on the context) that I am going to add towards the end of this article, which can be considered by the automation writers all over the world!
Speaking of considering various aspects, check Alex Siminiuc‘s articles if you are looking for Selenium and automation related articles and tips. Alex has written some articles which you can Google and find out, and pick the ones that’s useful for your context.
Now let’s look at the laundry list of various things that people consider as slowing the end-to-end tests down. Note that I am not saying these are contributing and to what extent. It completely depends on how you are set-up and your context.
- Server capacity / performance (in which the app. is hosted)
- Locators/Selectors
- The computer/virtual machine in which the test is run, and its capacity / performance
- App.’s UI design
- Multiple concurrent users (real-time traffic)
- Implicit waits in automation code
- Navigating through several pages instead of going directly to target page under test
- Repeating portions of code in scripts
- Data preparation in the script rather than doing it separately
- Browsers (headless or not)
- Tests that depend on each other
- Tests that do multiple things than having a single objective
- Sequential test execution
- Scripting language
- Finally, some say that Selenium is indeed slow
As you can see, there are multiple areas that you could check and improve to make things faster. I would like you to make the end-to-end tests fast (real fast!) and then come back and tell me that it does not matter if it is a test pyramid or an ice-cream cone, and it’s all good! Done?
Get in touch with me to share your automation design experiences. Happy to listen!