Workshop: Clean Coding Practices for Test Automation

Listen to “STPCON Spring 2019 Angie Jones and Smelly Code” on Spreaker.

We are often reminded by those experienced in writing test automation that code is code. The sentiment being conveyed is that test code should be written with the same care and rigor that production code is written with.

However, many people who write test code may not have experience writing production code, so it’s not exactly clear what is meant by this sentiment. And even those who write production code find that there are unique design patterns and code smells that are specific to test code in which they are not aware.

In this workshop, you will be given a smelly test automation code base which is littered with several bad coding practices. Together, we will walk through each of the smells and discuss why it is considered a violation and then refactor the code to implement a cleaner approach.

In particular, we will investigate the following smells:
  • Long Class
  • Long Method
  • Duplication
  • Indecent Exposure
  • Inefficient Waits
  • Flaky Locator Strategies
  • Multiple Points of Failure

By the end of the workshop, you’ll be able to identify smells within test code, understand the reasons why an approach is considered problematic, and implement clean coding practices within test automation.

Automation Workshop
Location: Regency C Date: April 1, 2019 Time: 9:00 am - 12:00 pm Angie Jones Angie Jones