Robotframework-windows installation and use

robotframework installation

RF installation:

RF is a framework based on python scripts, which has better support for the version of python27, but many classes of python3 are outdated in 2. It is recommended to install python based on a more stable version. The latest version is python3.9, and the more stable version 3.7.6

Use of robotframework

advantage:

  1. You can customize keywords through python and import through library, making the data manipulation of parameters and responses more flexible
  2. Support the writing of forward and reverse use cases, assertions can be judged by keywords, and the response text can be parsed into a json string, and the desired content can be extracted

Disadvantages:

  1. Many dependency packages need to be imported, and each test suite cannot be shared, and the reusability is poor, but it follows the python syntax.
  2. The interface is less usable, and only python27 supports better, but this version will no longer be maintained after 2020.

robotframework start

  1. step1: Check the python path where you installed robotframework
    Insert picture description here
  2. step2: Switch to the Scripts directory of the python installation directory:
    Insert picture description here
  3. step3: find ride.py, execute python ride.py
    Insert picture description here
    4.step4: set robotframework startup shortcut

Robotframework adds test suites and test cases

Create new test suites and test cases

Insert picture description here

Import dependent packages

Insert picture description here

New variable

Insert picture description here

Implement a simple http request test case

Insert picture description here

Execute test cases and view execution results

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_36875803/article/details/109278650