Mushishi Selenium2 + Python_11, automated testing project combat

P276
11.1.3 write automated test principle
In the process of writing automated test cases should follow the following principles:
1, a use case scenario for a complete, end-to withdraw from the user log in and close the browser;
2, a use case can only verify a function point, do not attempt after the user logs all system functions are verified again;
3, as few use cases written in reverse logic. Reverse logic on the one hand because many use cases (for example, phone numbers wrong there are dozens of cases), on the other hand an automated script itself is more fragile, complex cases with the reverse logic to implement cumbersome and error-prone;
4, with use cases and avoid dependence between the embodiment;
5, reducing the need for the test scene after the completion of a test case, so as not to affect the execution of other use cases.
11.2.1 Preparations
[Simple projects, or for only a few dozens of items of use cases can be considered a linear model to write use cases; but when hundreds of use cases to achieve need to consider how to reduce redundant test code, and the code abstract stratification, which uses design patterns and so on - these words explain the actual scripting project is a complex process
 

Guess you like

Origin www.cnblogs.com/TomBombadil/p/10977511.html