1. Error handling: Always attempt to validate that the automation is where it should be. If it is not, then try to recover the automation back to the starting point.
2. Start and finish at the same point: Logon and logoff processing should occur only once, unless there is a specific requirement. As the script iterates, the automation should finish an iteration at the point it started.
3. Comments: Scripts should be well commented, detailing the purpose for the script as well as the individual steps.
4. Response time collection: Response times for key actions should be collected.
5. Randomness: Wherever possible, data should be random as much as possible, e.g. postcodes entered should vary. Where a range of data is used, these can be stored in external files, which are accessed by the automation. Navigation through a function should also vary, e.g. locating a customer based on name as well as postcode.
6. Loops: Repetitive actions should be placed inside loops.
7. Sub routines: Large blocks of code that are placed inside nested if statements, or a repeated in the automation can be placed in a subroutine that is called. This aids the readability and maintenance of the automation.
8. Parameter tables: Some variables entered need to vary so that different parts of a database table are accessed. Data like this can be placed in parameter files so that different values are used for each iteration of the business flow.
9. Waits: User think time should be placed at appropriate points inside the automation to simulate the way a real user keys a function.
10. Standards: Naming and other standards should be in place to assist readability of the automation, and to help the automation work together when several people are involved in coding the scripts. |