In 2018, Kent C. Dodds put a new testing model up against the well-known pyramid. He gave prominence to the integration testing, which formed the biggest part of that shape. Dodds assumed that this is the layer where key benefits are concentrated – such as reliable results at relatively low expenses within a short time. This model was called a testing trophy.
Under this approach, QA specialists pay the most attention to integration testing. The number of end-to-end tests increase correspondingly, and unit tests form the smallest part of all test types.
You can set up your Selenium Grid in two different ways: using the command line or using a JSON config file. The first way is easier than the second, but you’ll want to follow the latter guide for best results. Once you’ve done this, you can then add browsers to your Selenium tests. Then, you can create multiple web browsers and test them all. If you don’t need a browser, you can simply add as many as you want.
The testing approach in which the most emphasis is laid on integration tests has the following benefits:
- Integration testing provides for cost-effectiveness, good speed, and adequacy.
- Out of all tests, integration tests have the best ROI as they are more reliable than unit tests and not as expensive as end-to-end tests.
- Integration tests allow developers to easily rewrite their code without the need to change the entire test suite.
Even taking into consideration all the pros of such a concept, how to put it into practice? In what way can you increase the number of integration tests? Let’s throw some light on the matter.
Jeff Nyman proposed to enhance test simplicity in integration tests and lay stress on production faithfulness earlier in the testing process. He brought into focus the importance of a design that clears up the intent and helps to make decisions in situations where there are multiple choices.
Dodds recommended two ways to solve this issue:
Firstly, when testing, you shouldn’t pay too much attention to every single piece of code at the unit level. The more tests you have here to cover the code, the less sure you feel about the compliance of the app with the requirements. In other words, as code coverage gets above 70%, the benefits of tests start to decrease. For example, while paying heed to the rare cases that are unlikely to have much impact, you’re in danger of postponing the deployment dates.
Secondly, you should ensure the correctness of units at the integration stage. If the specific integration test checks the same elements that the unit test does, then successfully passed integration tests indicate that those units the modules consist of are also correct.
Testing is kind of a philosophy. Each product is unique with its features, purpose, complexity, and risks. Each company has its own business goals and the reasons why it needs the app. Therefore, the idea behind the testing model should vary from case to case. This idea changes depending on how much time QA specialists spend on different types of tests, i. e. unit, integration, and end-to-end tests.
Each type of testing has its benefits. Unit tests deal with simple problems, and they are the cheapest. However, unit tests can’t guarantee that the entire product runs as planned. Integration testing offers companies the best combination of speed, cost, and reliability. End-to-end tests are the most expensive ones, but they consider the design and provide the required level of assurance.
Although we consider it best to pay the most attention to the integration testing layer because of its reasonable cost and high efficiency, every project needs unit and end-to-end testing as well. So be flexible and combine different types of tests to develop high-quality products that will meet your business goals.
Are you curious to find out more? Learn about the features of the above testing approach with Andersen – software development company.