Successful Automation Testing
Successful Automation Testing
There has been a significant progress in the software testing industry with regards to test automation, but still a lot of test automation projects fail or are less effective than they should be. This article gives you an overview of successful automation testing.
Sadly, many managers and test professionals believe that automation should be applied only to a stable software program, meaning one that does not change frequently. This assertion stems from the fact that in the early days, only regression tests were being automated, and today a lot of people still think in that context.
This belief leads to one major problem: teams creating a big set of automated tests at one high level using Selenium/WebDriver. Because these tests run in the browser and can be very fragile, this in turn can cause a lot of maintenance work that ends up distracting the team from focusing on finding defects in the software.
Companies and teams that have been successful in test automation have already discovered that Selenium/WebDriver should be used for high level user journeys. Other levels of automation are required to test the software progressively, from the most basic units to high level end to end user journeys.
Testing is like fishing: you use different types and sizes of hooks and nets for different types and sizes of fish. If your automated tests are at one level – the top – you will not catch those low level defects and conversely, if you have only low level tests, the big defects will just escape past into production undetected.
Below is an automation approach we have successfully applied to many projects and we have found that it works perfectly well.
Using this approach in one project, for example, we had 28 system test scenarios, which were very concise and required minimum maintenance. On the other hand, we had about 2,000 functional test scenarios that ran in less than 3 minutes. It is these tests that uncover most of the defects because by the time we reach the system test, the software is cleaner overall so bugs stand out more.
Another important aspect is that we implement automation testing as part of development. Automation and testing are not things that happen afterwards but rather they are included in the definition of “done”. That means we actually use our automated tests to help with development as developers and testers run these tests tens or even hundreds of times a day as they do their job. That seamless integration leads to a more productive workforce that is also more harmonious.
To truly create a successful automation testing, you must deploy an integrated approach that reviews the software at all levels. WebDriver is still very important especially for end to end scenarios run in the browser as real user, but there are lot of things that can be tested prior to that. Try to break your tests into different stages and find a way of automating them closer to the bare code, for example you can pretty much test all API calls using frameworks like Rest-Assured or RestSharp without WebDriver. You can validate all positive and negative scenarios, including error messages and parameter validations so when it comes to WebDriver you focus of few end user scenarios rather input validations. These tests will run very quickly, they are stable and help developers a lot in implementing new features and testers find new bugs.