A couple of weeks ago, Sauce Labs and Sencha conducted a joint webinar on Web Application Testing using BDD and WebDriver. We had over 800 people register, and many more have watched the event on-demand. You can watch the recording.
We touched on many key topics including the importance of test design, role of BDD in test automation, test longevity, cross-platform test automation and continuous integration, all of which will help you achieve success in test automation. But the bottom line is: a clear test strategy is key for long-term success.
In this blog post, I will share the key elements of a successful test automation project that stand the test of time.
Test Design: Test design is a crucial aspect of test automation. Things can go awry if the project is not well architected. Whichever technology you want to use for your test automation project, some key points such as test organization and a clear test strategy are basic ingredients. Remember the rule in computing – garbage in, garbage out.
Design Patterns: As test automation has evolved over the years, many design patterns have been adopted in the web testing landscape. Adopting these techniques based on your project requirements can help you not only scale but maintain projects in the long run. Patterns such as Page Objects, UI mapping, and Data-driven testing have made it possible to keep the amount of code needed to a minimum when creating tests for all possible scenarios. These patterns also help to keep the code in a centralized location and fix failures in tests much faster when the application is modified.
Role of BDD: Behavior Driven Development has been a great support for design-based test automation projects. BDD gives automated tests good organization, helps centralize UI definitions, and provides great documentation that will ensure tests can be maintained even during times of attrition within a team.
Visual Testing: The importance of visual testing is another key area that we focused on. Testing for UI changes on multiple browsers and on multiple platforms can be painful. Built-in screenshot capabilities help capture the baseline images of a good build and compare them against subsequent test runs. This gives a team much-needed confidence and ensures a smooth flow in the continuous delivery process.
Infrastructure Hassle: Infrastructure poses the biggest problems for automated testing as it’s not possible and very expensive to maintain virtual machines for every browser/platform combination. Companies are leveraging cloud providers such as Sauce Labs to execute their automated tests. Sauce Labs provides a rich set of resources plus access to hundreds of virtual machines with most browser/platform combinations that are needed. Sencha Test is integrated with Sauce Labs, so there are only a few setup steps. You can run your regression test suite on all the browser/platform combinations that are needed for your project.
Continuous Integration: The benefit of test automation is only realized when the tests are in a continuous integration process. Using CI helps you deliver multiple deployments with the highest confidence. Sencha Test is seamlessly integrated with TeamCity and Jenkins, which will help you achieve the end-to-end automation you need for success.
Overall, long-term test automation success can be achieved by using a clear test strategy, creating a well-planned test design, investing in the right kind of infrastructure or partnering with a vendor such as Sauce Labs, testing more at the framework level, and relying less on the DOM.