Tuesday, April 29, 2025

Test Automation Coding Standards & Guidelines

 Test Automation Coding Standards & Guideline

1.Introduction
1.1 Why coding standards are so important?
1.2 Overview
1.3 Assumption

2. Naming Convention
2.1 What is naming convention?
2.2 Why use a naming convention?
2.3 General Naming Guidelines
2.4 Naming Variables
2.5 Naming Exception Objects
2.6 Declaring Local Variables
2.7 Naming Classes and Interfaces
2.8 Naming Methods

3. Comment Standards
3.1 Implementation of Comment Format
    3.1.1 Block Comments
    3.1.2 Single-line Comments
    3.1.3 Single-line Comments
    3.1.4 End-of-line Comments

4. Function/Method Standards
4.1 Function Name
4.2 Naming Accessor Member Functions
    4.2.1 Getters
    4.2.2 Setters
4.3 Constructors
4.4 Function Header
4.5 Internal Documentation
4.6 Function Complexity
4.7 Function Structure

5 Indention

6 Automation Script Standards

7 General Guidelines

8. Document Control


6 Automation Script Standards

Folder/package structure should be created based on the functionality/purpose of the scripts/files present in the respective folder.

For Example,

src\Project\Component: This package should contain all the java files related to objects of the Component pages.

FunctionLibrary: This package should contain all java files related to global functionalities like EnvironmentVariables.java, Utilities.java (re-usable functions), SpreadSheet.java etc.

Examples:

EnvironmentVariables.java -> This java file is used to maintain environment set up for the overall projects.

Utilities.java -> This java file should contain all methods which are common across the application.

SpreadSheet.java -> This java file should contain functions definitions required to operate excel files.


No comments:

Post a Comment

BrowserStack Testing

 Test any app: Web, mobile & enterprise Any type of testing:  Functional |  Cross-browser & real device | Accessibility | Visual | P...