November 2024
Intermediate to advanced
300 pages
7h 12m
English
As your classes grow by taking on more behaviors, you’ll need more and more tests to describe the new behaviors. Use your test class size as a hint: if you declare several dozen tests in one test source file, chances are good that the class under test is too large. Consider splitting the production class up into two or more classes, which also means you’ll want to split the test methods across at least two or more test classes.
You may still end up with a couple dozen test methods in one test class. A larger test class can not only be daunting from a navigational sense, but it can also make it harder to find all tests that relate to each other.
To help group related tests, you might consider starting ...
Read now
Unlock full access