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} |
Pingback:Practical Tips About Test Automation | Robot Framework中文站