Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

In this webinar, learn why and how you can build a clean and effective test automation code.

Devansh Bhardwaj
January 11, 2026
Some programming teams fail to write high-quality code while trying to meet the software development deadline. This is counterproductive. It doesn’t matter how visually appealing a new application may appear; if the underlying code is hard to understand, it will be challenging to maintain, update and scale it.
It is overly simplistic to judge code as ‘good’ or ‘bad.’ Code should be rated relative to its context. Moreover, almost all code can be improved over time, particularly as programming languages evolve and new solutions emerge.
We’re sure you would have many questions about how you can write clean and effective code for test automation.
But worry not! Our special guests Sai Krishna, Lead Consultant, ThoughtWorks, and Srinivasan Sekar, Lead Consultant, ThoughtWorks, have teamed up with Manoj Kumar, VP Developer Relations at TestMu AI to share their tips and to answer your questions on how to build a clean and effective test automation framework! They have also discussed implementing clean code principles like SOLID and DRY and seeing how test automation can improve.
In case you missed the power-packed webinar, let us look at the major highlights of the event.
The webinar starts with Manoj asking our speakers a question: “What do they think about test automation code? Is it at the same level as development code?” Manoj shares how testers and QA tasks are not prioritized among companies and ask for their take on this as consultants.
Here is the video recording of our webinar to familiarize yourself with the powerful knowledge bombs it contains!
To get more such videos on various automation trends and to enhance your automation testing journey you you can subscribe to the TestMu AI YouTube channel for details guidance around automation process like Selenium , Cypress, Playwright, and more.
Srinivasan agrees with Manoj on how QAs and tester’s tasks are considered unimportant and points out that while consulting, they always emphasize that quality is everyone’s responsibility. He adds that ensuring the quality of the code, whether production or development, is not just the QA’s job. As per him, this gives the team a sense of why testing code is crucial.

Sai adds to this that even time to market plays a significant role. He explains that if we are looking for a shorter time to market, our automated tests should have the right principles and practices to enhance the application code. He adds that the automation testing framework should be robust, and the production and test code should be equally treated.
Sai then takes the lead of the webinar by explaining what they will address in the webinar. He adds that for this session, they will explain code refactoring with a live WebDriver script, show how to eliminate code smell, and discuss the best practices for writing clean and effective test code.

Moving forward, Srinivasan explains what a clean code looks like. He adds that a clean code should eliminate code smells such as dispensable, code comments, duplicated code, and more. Srinivasan tells the audience they will look at bloaters such as large class, long method, and too many parameters.

Moving on, he informs the audience about the principles they will explain – The Single Responsibility Principle and the Open-closed Principle.
Sai then showcases the live code refactoring demo of a sample WebDriver script.

Srinivasan goes on to explain the Single Responsibility Principle. As per him:
Srinivasan also explains the open-closed principle. He says:

Moving forward, Sai highlights the best clean code practices. He highlights the following practices:
Before wrapping up, Sai and Srinivasan answered several questions the viewers raised. Here are some of the insightful questions from the session:
Srinivasan answers the question by raising an initial point in the discussion that the code’s architecture is not just a QAs responsibility. He suggests that people can invite developers and get their help in designing the architecture. He adds that pairing with the developers would help understand the design patterns and solve problems.
To answer this, Srinivasan says you should consider refactoring the code if it is not readable. If you want to improve the design, add a new feature, or fix bugs, then refactoring should be done. Srinivasan says one should prefer code refactoring for code reviews and even for eliminating code smells.
To add to this, Sai recommends following the “boy’s scout rule,” which implies reading the code better than how you found it. He says while doing this; if you come across any code smell, you can refactor it then and there.
We hope you liked the webinar. In case you missed it, please find the webinar recording above. Make sure to share this webinar with anyone who wants to learn more about clean coding practices for test automation. Stay tuned for more exciting TestMu AI Webinars. You can also subscribe to our newsletter Coding Jag to stay on top of everything testing and more!
We’ve just released the second part of our series on Clean Coding Practices for Test Automation. Take a look !
That’s all for now, happy testing!
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance