Lesson 6 of 6
Maintainability review
9 min
Listen to this lesson
A framework is software, and the ISTQB syllabus says so plainly: test automation is a software development activity, so design principles and patterns matter as much for test automation engineers as for developers. The best time to find maintainability problems is a design review before the suite grows, and then once per release. This lesson gives you a review method you can apply to Contoso's framework or any other.
Three questions behind every review
| Criterion | Question | Symptoms of trouble | Typical fix |
|---|---|---|---|
| Coupling | If one thing changes, how many places must change? | A Fiori update needs edits in dozens of tests; tests reference locators or system IDs | Move details into page objects, components or profiles |
| Duplication | Is each piece of knowledge in exactly one place? | Several versions of Create Sales Order; copied logon code; repeated data | Merge into one component or keyword; parameterize |
| Readability | Can a process owner read a test and say what it proves? | Tests full of clicks and field IDs; no expected results; cryptic names | Business keywords, explicit expected results, naming rules |
Design principles in practice
The syllabus lists the four object-oriented principles (encapsulation, abstraction, inheritance and polymorphism) and the SOLID principles, and highlights a few design patterns for automation engineers: the facade, the singleton (often used so that only one driver talks to the system under test), the page object model and the flow model. You do not need to quote them in a review, but they explain most findings. A component that knows about environment URLs violates single responsibility. A test that calls an adapter directly breaks encapsulation of the layers. A copy of a component for one variant is a missed abstraction.
A review checklist
- Do tests call only business keywords or components, never adapters or locators?
- Does every component have a documented contract and return business outputs?
- Are environment, users, secrets and data all externalized and validated at run start?
- Is each locator defined once, in a page object or equivalent, using stable UI5 or GUI identifiers?
- Does synchronization wait for conditions, never for fixed time?
- Do tests assert on business results with explicit expected values?
- Is every automated test mapped to a test case, and do results and defects flow to test management?
- Are the framework, tests and data sets versioned together and reviewed like code?
- Is there a measured flaky rate, and is anything above the agreed threshold being fixed?
Measure, do not guess
Use data from the last releases: repair hours per test and per component, number of files touched per UI change, flaky rate, and time to add a new variant. A good framework shows repairs concentrated in a few components and adapters, near-zero edits to test definitions for UI changes, and new variants added as data rows. If the numbers show the opposite, the design is coupled, whatever the diagrams say.
What would you do?
Kenji reviews the framework and suggests adding a separate layer for logging, one for screenshots, one for data, one for configuration and one for reporting. What should Priya answer?
- Test automation is software development; apply design principles and patterns.
- Review coupling, duplication and readability; each has clear symptoms and fixes.
- Use a checklist covering layering, contracts, configuration, locators, synchronization, assertions, reporting and versioning.
- Measure repair hours, files touched per change, flaky rate and time to add variants.
- Refactor first where coupled tests meet frequently changing areas.
Check your understanding · not graded
Lesson check
1. A Fiori update requires edits in 60 test files. Which maintainability problem does this show?
2. Which pattern does the ISTQB syllabus mention for ensuring only one driver communicates with the system under test?
3. Two slightly different Post Goods Receipt components exist. What is the usual fix?
4. Where does refactoring usually pay off first?