Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

Selenium Automation Code Review Check List /RulesPost title


Selenium Automation Code Review Check List /Rules:

 
A code review is used to ensure that new or changed code meets an established quality bar before the code is integrated into the daily build. Quality considerations are coding standards, conformance to architecture and design, performance, readability, and security. Code reviews also provide additional insight from other developers on how code should be written.
This checklist is intended for bringing to mind important issues to look for while examining code
 TestScript wise :Completely
•    Verify that code covers all of the test steps & verifications
•    Verify for the right user credentials in login section.
•    Check for logout code at the end of the script

Variables Initialization/Declaration:
Check variable and parameter initialization.
•    At script level
•    At start of every loop
•    At function entry
•    Check for repeated reading of data from data table within same script.
•    Follow the naming convention
•    Check for duplicate variable declaration in multiple methods inside a script.
•    Ensure that Instance/class variables are private.
•    Verify that static variables are initialized.
•    Use of static variables is justified with comments

Exception Handling:
•    Ensure that Cleanup code is in finally block.
•    Check for try/catch block in each method.
•    Verify that there are no unnecessary catch blocks.
•    Verify that functions throws only the declared exception

System resources:
Verify that they are:
•    Properly declared ( File instance, Database )
•    Opened ( File instance, Database )
•    Closed ( File instance, Database )

Coding Standards:
•    Ensure that the code conforms to the coding Code formatting:
•    Verify that code is not using tab for indentation.
•    Use two white spaces to indent.

Comments:
•    Verify that the code is commented appropriately
•    Verify the script header for author, date created & modified.
•    Verify the method header for Test case description, author, parameters to be passed & exceptions thrown.

Browser Compatibility:
•    Ensure the code is developed to run on supported browsers.

Logging:
•    Ensure that appropriate debug logs are in place.
•    Verify that correct boolean value is passed to methods which log the validation result.
•    Ensure Expected & Actual Values are logged for all verifications.
•    Ensure a screenshot is captured for script abortions.

Coverage :

•    Check there is no code for script abortion in case of a validation failure if the script has succeeding verifications independent of the failure.
 

Post a Comment

2 Comments

  1. thanks for detailed explanation.

    ReplyDelete


  2. Thank you for sharing this post.

    I have never done this testing but after reading your blog. I will surely work on this testing.

    Test automation services

    ReplyDelete