Practical Tips About Test Automation

During the daily work of test automation with Robot — the keyword-driven framework, I found that there are some tips for people to make better test automation.

1. Using full spelling of word instead of using abbreviations, coz there may be many different understanding of the same abbreviation, e.g. ATM… In the past I thought it’s Auto Transaction Machine, which mainly used for serving money. Later I know that ATM sometimes mean Asynchronous Transfer Mode. One example, one test has variable ${EXPECT CC NUMBER}, the engineer explained that CC is for Connection Confirm, well we asked if there is also a Connection Cancellation, which one will people understand?

2. The system under test should have enough testability, to ease the testing and test automation work. There must be convenient way to check some resources, which will reduce the dependencies among test casees, e.g. connection setup / release, if it’s able to check exsiting connections easily, we can check to find a suitable connection id at beginning, to improve the robust.

3. Instead of using magic number, create a meanlingless variable might be a good idea. See,
   | ${result}=       | check something | ${some parameters} |
   | Should Be Equal  | ${result}       | 1                  |
and would it be better if,
   | ${expect number of connection} | Set             | 1                  |
   | ${result}=                     | check something | ${some parameters} |
   | Should Be Equal                | ${result}       | ${expect result}   |


About Kaveri, Yi XU

Agile Coach & Consutlant


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )


Connecting to %s