May 2024
Intermediate to advanced
352 pages
10h 45m
English
assert statementsWhile unit testing is aimed at reducing the number of bugs in a program, the unit test itself is a program, so it’s natural that it may contain bugs, too. Some developers assume it’s not a big problem because if a unit test has a bug, then it will likely fail. However, I have seen many buggy unit tests that actually don’t test anything, so if the bug appears in the program, then the test won’t do its job of detecting the regression. In this chapter, we explore ...