RF role and purpose

robotframework automation principle: by writing ride tool script, load the specified test UI library, and then specify a script to run through pybot program, call the browser-driven, open a browser, navigate the browser page elements, to simulate the behavior of a user operation

 

Why use Automation: reduce workload, improve efficiency, scripts can be reused

When using automatic: after general testing, regression testing

Using automated condition: project cycle is long ( more than 8 months), stable version requirements

 

Case design pattern (separate data and processes)

Example 1. package

Example package object is to separate and process the data, which is what we often use case hierarchical design

Example hierarchical design using: the object is to separate the data and processes

 

2. The purpose of separation

        A search function, if you need to change the input values ​​for different input values ​​written test case execution,

You need to stop replication use cases, in order to reduce redundancy repeat the script, we need a simple hierarchical,

To extract all the keywords into a keyword search, keyword and then call in a different use cases,

And pass different parameters to achieve different test data in the same process

        1, a high flexibility of use cases

        2, keyword usage rate

        3, easy maintenance script

        4, do not repeat the preparation of certain information

        

3. The three-tier model

        Layer is the key element layer, which need to import corresponding library such as: selenium2library

        Process layer is to use an example of the operation flow, such as opening a browser - typing - click, the layer needs to import element layer

        Stories layer write their own use cases, such as: Forum login use case (that is, our robot), the need to import layer process layer

Guess you like

Origin www.cnblogs.com/Mr-ZY/p/11697044.html