Treat test code like production code
blog.ploeh.dk·1w
🔧Code Generation
Preview
Report Post

You have to read and maintain test code, too.

I don’t think I’ve previously published an article with the following simple message, which is clearly an omission on my part. Better late than never, though.

Treat test code like production code.

You should apply the same coding standards to test code as you do to production code. You should make sure the code is readable, well-factored, goes through review, etc., just like your production code.

Test mess #

It’s not uncommon to encounter test code that has received a stepmotherly treatment. Such test code may still pay lip service to an organization’s overall coding standards by having correct indents, placement of brackets, and other superficial signs of care. You don’t have to dig d…

Similar Posts

Loading similar posts...