savchenko.tech / software engineering blog by Maryna Savchenko

Once again about the testing

2022-01-21

Effective software testing should minimize the amount of defects and maximize stability of the product. Achieving it in practice can be quite effortful. What to test? How many test cases? Who should test?

Questions what to test and on which level can be answered by testing pyramid. testing.png

1. Unit testing

Unit testing is a type of testing where system under test is an individual unit and is done during the coding phase. A unit may be an individual method, module or object.

Advantages:

Disadvantages:

2. Integration testing

Integration testing is the test level used to test the integration between the code and external parties (very often database).

3. System testing

System Testing is testing the system as a whole. This type of test checks if given input X, the system will provide output Y.

Advantages:

Disadvantages:

What to test on different levels?

That can depend on many peculiarities of the software system. Guides that works for me:

Additional sources:

  1. Effective software testing by MaurĂ­cio Aniche
  2. Unit Testing Principles, Practices, and Patterns by Vladimir Khorikov