I have started to automate tests in Playwright with TypeScript. I am now writing standards for the tests. I view writing the standards as a journey because I am adding to the standards as I learn more.
I have started to create these standards because:
- It helps me get my thoughts in order
- It helps me learn from my mistakes because I won’t repeat errors.
- I can always add to the standards, such as when I started to use describe blocks and needed a naming convention for them.
- The standards help to share knowledge.
- Standards facilitate collaborative working because they enable test automation engineers to work in a consistent way
- I want to be able to maintain the tests easily
I have found lots of useful advice in testing and programming literature:
- “Any organization that wants to move fast will have standards in place” [1].
- Standards can be grouped under headings such as naming conventions, coding standards, user interaction conventions, file structures, configuration management practices and tools [1].
- Standardise is one of the Five S’s and standards help us “reduce complexity over time to improve ease of maintenance” [2] when developing software.
- It is best to adopt naming conventions at the start of developing the test suite in order to avoid a free-for-all which will make it difficult to find scripts and files as the test suites get larger.[3]
- “All standards should be simple to follow and make maintainability easier”[4].
- Naming conventions improve the readability and maintainability of your Playwright Testing framework [5]
I have also learned from colleagues in a book club that it is useful to say why the standard is needed because at a later date, its need may not be obvious and it could be removed.
Writing standards for test automation is a journey not a destination because I am learning and putting that learning into the standards.
If you have more sources of information about writing test automation standards please let me know.
References
[1] Implementing Lean Software Development by Mary and Tom Poppendieck (2007, p193)
[2] Implementing Lean Software Development by Mary and Tom Poppendieck (2007, p192)
[3] Software Test Automation by Mark Fewster and Dorothy Graham (1999, p197)
[4] Agile Testing by Lisa Crispin and Janet Gregory (2009, p227)
[5] Using naming conventions to improve the readability and maintenability of your Playwright Testing framework by Boyana Staneva (2023)