Optimization of Selenium and Integration testing
In the article I want to make an overview of test automation for web-applications. In the end I will write how to optimize a number of selenium and integration tests to achieve the most efficient automation testing process.
All web-applications require testing to simplify the process of quality control during the development. In order to make testing of an entire application more easy, professionals use selenium, unit and integration testing. Every type of these testings are efficient for its particular purpose. E.g. unit tests are to verify if separate modules of an application work correctly, integration tests check if several modules interact properly, selenium tests examine functionality of an application through the user interface.
Roughly, unit tests are part of integration tests, integration tests are part of selenium tests.
So we have three types of tests. Every type takes some time for the execution. On a big projects, time of the tests execution can be too high. For this purpose an optimal separation of testing areas for specific types of tests makes sense.
Unit tests are the most grained type and their total number cannot be reduced without impacting on project’s quality monitoring. Hence, it makes sense to split test efforts between integration and selenium tests. Integration tests perform the same action as selenium tests except for interaction with the user interface. A good solution of the problem is to perform all positive test flows with the help of selenium tests and the rest of flows delegate to integration tests. As mentioned above, integration tests don’t interact with the user interface. This circumstance leads us to the second case of using selenium tests – verification of interface elements.
Validation functionality is one of the most important parts of every web-application. Often there are a lot of different messages which appear if something goes wrong with input data. Warning for a particular form is always displayed in the same way. There is no sense to check all messages with the help of selenium tests. One check per form is enough, the other messages can be checked with the help of integration tests.