Chapter 2. The Spaghetti Pattern

 

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."

 
 --Martin Golding

Writing and maintaining any form of software is like fighting entropy; given enough time and changes, any code base will gradually decline into disorder. A test suite is a closed system; if you do not provide energy in constant upkeep and planning, the suite will deteriorate and will fail constantly. Every new feature and line of code added to our website makes our test suite obsolete. The only way to fight back these natural forces is to constantly upgrade and improve existing tests.

In this chapter, we will start to grow our test suite organically and take a look at an anti-pattern ...

Get Selenium Design Patterns and Best Practices 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.