What if you disagree with the testing pyramid?

Many people disagree about the idea of a testing pyramid and whether we should favor unit testing. These developers argue for the testing trophy: a thinner bottom level with unit tests, a bigger middle slice with integration tests, and a thinner top with system tests. Clearly, these developers see the most value in writing integration tests. While… Continue reading What if you disagree with the testing pyramid?

What do I test at the different levels?

I use unit tests for units that are concerned with an algorithm or a single piece of business logic of the software system. Most enterprise/business systems are used to transform data. Such business logic is often expressed by using entity classes (for example, an Invoice class and an Order class) to exchange messages. Business logic often does not depend… Continue reading What do I test at the different levels?

 When to use each test level

With a clear understanding of the different test levels and their benefits, we have to decide whether to invest more in unit testing or system testing and determine which components should be tested via unit testing and which components should be tested via system testing. A wrong decision may have a considerable impact on the… Continue reading  When to use each test level

Verification is not validation

Finally, note that a software system that works flawlessly but is of no use to its users is not a good software system. “Coverage of code is easy to measure; coverage of requirements is another matter.” Software testers face this absence-of-errors fallacy when they focus solely on verification and not on validation. A popular saying that may help… Continue reading Verification is not validation

No matter what testing you do, it will never be perfect or enough

As Dijkstra used to say, “Program testing can be used to show the presence of bugs, but never to show their absence.” In other words, while we may find more bugs by simply testing more, our test suites, however large they may be, will never ensure that the software system is 100% bug-free. They will… Continue reading No matter what testing you do, it will never be perfect or enough