Chapter 17. Working with Test Code
Apart from following principles of good design, just like production code, test code has an extra area responsibility—to explain and to describe what the production code is supposed to be doing. Also, just as with production code, some people may feel uncomfortable deleting it. This chapter contains some pointers about how to work with existing test code, how to improve it, and when to delete it.
Commenting Tests
Should test code be commented? That depends. On one hand, the quality of the test code should be on par with the quality of the production code. It should be well structured, follow all the principles of good design, and test names should be accurate and descriptive (and so should the variable names) ...
Get Developer Testing: Building Quality into Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.