RunnerGo-Interface Management & Scene Management

1. Interface management

insert image description here

1. New interface

Interfaces can be added via 手动添加or . 批量导入Batch import supports apipost, apifox, postman and other data sources.
insert image description here

2. Set request parameters (same as ApiPost)

Header: Header parameters can be set or imported, and cookies are also set in the Header;
Query: Query supports the construction of URL parameters, and supports RESTful (introduction) PATH parameters (such as: id); :
BodyBody provides three types of form-data / x-www -form-urlencoded / raw , each type provides three different UI interfaces:

1) When submitting a form, switch to x-www-form-urlencoded
2) When submitting a form with files, switch to form-data
3) When sending JSON objects or other objects, switch to the corresponding raw type

认证: Supports four authentication methods: private key-value pair, Bearer auth, Basic auth, and Digest auth; :
断言Supports three assertion methods: response header, response body, and response code;
关联提取: Supports two extraction forms: json extraction and regular extraction;
接口设置: Can be set Whether to follow redirects, the number of times to follow redirects, the request read timeout limit, and the response read timeout limit.

insert image description here

3. Set global variables

Set the variable name and variable value in the global variable, and the scope is within the current team. The calling method of the global variable is to use two { {}} to refer to the variable name, such as: { {变量名}}. After setting, the variable can be referenced at the interface URL or the request area.

insert image description here

insert image description here

4. Public functions

Commonly used functions are as follows:
insert image description here

5. Environmental management

After setting the environment variable, it can be directly used in the front URL of the interface.
insert image description hereinsert image description here

6. Response area

The response area includes: real-time response, request header, request body, response header, assertion result, and extraction result.
The returned data is in beautification mode by default, which is convenient for viewing JSON XML format. You can view other types of types by toggling "native" mode.
insert image description here

2. Scene management

insert image description here

1. Create a new scene and import an interface

1. Establish the scene to be tested, and input the scene description as required. RunnerGo connects the interface to be tested in a flow manner and conducts the test from top to bottom.
2. Click [Import Interface] at the bottom of the scene canvas, and you can see the interface you created in "Interface Management" in the "API Adder" on the right. You can quickly check the interface that needs to be tested, and copy the interface to be tested to the scene.

insert image description here

2. Create a new interface in the scene (not synchronized to interface management)

insert image description here

3. Add waiting controller

Insert a wait time between process configurations, up to 60s.
insert image description here

4. Add a conditional controller

Judging whether a variable satisfies a certain condition, thereby determining whether the interface of the controller is running. It can be judged by the value extracted from the previous interface, a certain value returned or other values.

insert image description here

5. Scene interface debugging

1) Click the "Start Debugging" button in the upper right corner of the scene to debug all the interfaces in the scene (green if passed, red if not passed, and unchanged if not executed); 2) After debugging the scene, click "View Results" in the
interface " button to view the results returned by a single interface in the scene;
3) Click the "..." button in the upper right corner of the interface and select "Edit Interface" to perform single interface debugging;

insert image description hereinsert image description here

6. Interface weight

The interface weight refers to the percentage of the concurrent number. As shown in the figure below: the precondition concurrency number is 500 . 登录随机值The interface weight is 100, and 首页the interface weight is 80. Since there is no interface on the upper level of these two interfaces, the concurrency of the random value interface is 500, and the concurrency of the home page interface is 400; since the right interface has a weight of 80, 注册副本then We take the maximum concurrency number of its upper-level interface as 500 as the standard, then its concurrency number is 400, and its lower-level 登录interface (right side), since the weight is 50, the weight of the login interface is equal to: 400*0.5= 200 concurrency.

insert image description here

7. Interface mode

Four modes are supported: default mode, error rate mode, response time mode and replies per second mode.
insert image description here

error rate mode

Test objective: the error rate of a single interface in the scenario.
Function: If an interface in the scenario exceeds the set error rate threshold, the plan will automatically stop; if the error rate does not exceed the error rate threshold after reaching the maximum number of concurrency, it will continue to run for the set duration of stable duration and then end the plan. plan.

response time mode

Test objective: According to the response time of all interfaces in the scenario, the response time of each interface is compared with the set threshold.
Function: If one of the interfaces exceeds the set threshold, the number of concurrency will no longer increase, and the plan will end after running for the set duration of stable duration; if the set threshold is not reached after reaching the maximum number of concurrency, Then continue to run for the duration set by the stable duration and then end the plan.

replies per second mode

Test target: Number of interfaces sending and responding per second (RPS). Calculation method: RPS = total number of requests on the interface * concurrent number of interfaces / total response time, which is approximately equal to: concurrent number of interfaces / average response time (s).
Function: When the RPS is greater than the set threshold, the number of concurrency will increase to the maximum number of concurrency, and when it is less than the threshold, it will gradually increase according to the setting.

8. Scene settings

Add a parameterized file at the uploaded file. The first line of the parameterized file is the variable name, which is "comma-separated" in English. Add a variable with a fixed value at the variable. The files and variables added here can be referenced in the interface of the scene. { {***}}.
insert image description hereinsert image description here

Guess you like

Origin blog.csdn.net/qq_37515374/article/details/129644967