Designing your own system
This chapter began with our concerns with end-to-end test automation, stating that it was slow and brittle and that we had arguably seen more time wasted in the pursuit of tooling than time saved. Indeed, if your team can cleanly separate features and deploy them separately, you might be able to test and deploy each web page separately with humans, with no need for computerized inspection for regression.
If, however, you insist on going down this route, we wanted to provide our very best advice. So, consider the following:
- Abstract the code into functions.
- Abstract away the locators into objects with global names.
- If international, turn the names into a lookup table.
- Create tests that a business-facing customer could read and understand.
- Make them small.
- If you aren’t testing it in this test, avoid the user interface for setup. Instead, create shims and hooks to make setup quick.
- Version control the customer-facing...