Test automation, like any other programming activity, must be designed appropriately to ensure long term viability. Initial creation of automated scripts is the easiest part. It is the ongoing maintainability and sustainability which decides if you derive the stated benefits.
accelQ is developed on a design-first approach, where modularity and reusability are built into your test assets from the get go. Various use cases across accelQ, you will find this design-first philosophy as a central theme. Good design practice is essential for a sustainable automation.
With accelQ helping you build automation with a sound design platform, here are some best practices that help you make decisions when presented with multiple options. Each topic in this chapter deals with best practices in a particular area of design/development.
Adapt a consistent naming convention for entities depending on your organizational standards. Unlike traditional automation platforms, accelQ provides greater flexibility in using non alpha-numeric characters including white space character, so that you can name your test entities more natural and meaningful. Don't feel the compulsion to abbreviate or use programming conventions such as upper camel, lower camel etc. Clarity and readability starts from the naming convention. Go ahead and provide meaningful names to your test entities such as Contexts, Actions and Scenarios.
Some examples here:
|Context||Purchase Confirmation Page||confirmationPage||Complete page name so there is no ambiguity. Use spaces for clarity.|
|Action||Verify Account Balances||Account Balances||Action is a "verb" and should represent some "doing"|
|Login to QBank||Enter User Name||"Enter user name" is just one of the statements as part of Login.|
|Create New Task||Creating new task||Action should indicate a "command verb"|
|Scenario||Update password and attempt login with old password||Update password||Be clear with the name to convey complete understanding of what the Scenario does.|
|Test Suite||Sanity Suite for Retail Banking||Sanity Suite 1||Identify the purpose of the suite and module etc|
Alerts across the system
Alerts across various entities such as Actions, Contexts and Scenarios can be a great source of identifying incomplete items or those lacking common best practices. Pay attention to the alerts and try to address in a timely fashion. You can always filter the entities based on Alert flag from Navigator grids.
A Test Suite also allows you to filter Actions and Scenarios based on alerts.