UI Tests Are Fun to Write (If You Write Them Right)
Automated browser tests can be a nightmare to write and maintain. Unlike unit tests they’re tough to set up, slow to run, make permanent changes to data, and they’re incredibly brittle. Even a tiny CSS change can result in cascading failures!
You can’t ignore these issues, but you CAN design around them by adopting a few key patterns and techniques. Data creation helpers let you construct intricate data graphs in one line of code. Page Objects abstract away tedious browser automation code and make tests resilient to changes in HTML structure. Applied correctly, these patterns (and others) take away the pain and make UI tests a joy to create!