How do you perform code reviews on your Test automation code?

1 min read 1 Experts
Anshita Bhasin
QA Chapter Lead | Property Finder, DUBAI, UAE

When people from different places work on automation projects, everyone must be in sync while creating automated tests. That’s why code reviews are a must as they help ensure we’re all on the same page. Below are the considerations I take into account during code reviews, based on my experiences and learning:

Assertions in Every Test:
Ensure that every test includes appropriate assertions to validate expected outcomes.

Independence of Tests:
Confirm that each test is independent, avoiding dependencies on other tests for execution.

Generic Methods for Repetitive Code:
Encourage the use of generic methods to handle repetitive code, promoting code reusability.

AAA Pattern (Arranged, Act, Assert):
Verify that tests follow the AAA pattern for better organization: arranging preconditions, performing actions, and asserting outcomes.

Use of Config Files:
Check for the use of configuration files, especially for endpoints and test data. This ensures a centralized location for changes, promoting maintainability.

Proper Wait Mechanism:
Assess the use of appropriate wait mechanisms (implicit or explicit) based on specific use cases to handle synchronization issues.

Selectors Usage:
Emphasize the proper use of selectors, favoring relative locators. Use identifiers such as ID, class, or specific attributes consistently for element identification.

Documentation and Comments:
Encourage clear and concise documentation within the code. Include comments for complex logic or where clarification is needed.

 

ABOUT TESTVOX
Testvox
Testvox is a software testing company help your product reach its full potential. Get full cycle testing for your mobile and web applications while ensuring all quality assurance standards are met.