1. Installation Tutorials
Environment building not much said, online information a large pile, can refer to https://www.cnblogs.com/puresoul/p/3854963.html, write more detailed, worth recommending. Currently Python3 is not supported ride so, with Python2
2. Create a project
& Projects under the directory, so that the file is more clear, as follows
& created well, it's time to write the script theme is UI Automation, so with the selenium library, there are other auxiliary libraries
,cd c:\Python27\Scripts\, execute easy_install pip, install good pip after dos execution, success is as follows, unsuccessful Baidu find the reason
& This time install the common library of UI Automation
Pip Install Selenium
Pip Install Pymysql
Pip Install Cx_oracle
3. Open Ride
& Open this ride.py to your local counterpart.
& After the look, I have the file already, if you don't, open the directory you created as a test suite to put
& Create a new test case--test test suite
& Create a test case on the test suite
4. Import Scripts
5. Script Implementation Ideas
& Define an Automation use case template, encapsulate the keyword, parameterize the implementation, so import the Main method testweb.py
6. Global variables and use case completion
&ride case Fill rule, perform method index to specified Excel
Add a New resource--a name- select robot Format file
Confirm ~
& Configuration under Variables and values
& Import global variable file-select the created file
& Using the Created variables
7. Assertions
& the Case method to return the actual and expected results, and then ride the self-contained assertion should contain determine if the two values have a relationship to be Pass/fail
8. Multithreaded running use cases
& Execute the following command to install Pabot ( Note the following Python version for example ):
Pip Install robotremoteserver==1.0.1
Pip Install robotframework-pabot==0.22
& After installation, execution ( number of threads )
Pabot--processes--outputdir Results Project path /
[Python] Robotframework custom libraries for UI Automation