Skip to main content

Testing Process Scenario

In this section, you will learn how to add flow control conditions to optimize the testing process.

Developers can now add flow control conditions (such as loops, conditional statements, waits, and grouping) within test scenarios. This enhancement caters to the utilization of more intricate test scenario/process configurations, ultimately utilizing automated testing capabilities to address the testing complexities of intricate scenarios.

Group

When multiple steps in a test process are related, they can be categorized and placed into the same grouping. By grouping test steps, the test scene is better readable and operable.

Example: Categorize steps such as view details pet details, edit pet information, and view details again.

    1. Click the button "Add Step" at the bottom and select "Group".
    1. Drag the steps you want to categorize, under Grouped Steps, or add steps directly in the group.

Iteration

When the test step needs to be executed repeatedly, it can be solved by setting the number of loops. At the same time, in the additional settings of the loop, you can customize the judgment of "break condition/when encountering an error".

Example: A pet store owner logs in to the pet inventory management console on the evening when the business closes, checks the details of each of the 10 pets sold today and changes its active status to sold.

    1. Click the button "Test Steps" at the bottom and select "Loop".
    1. Enter the desired number of loops of 10.
    1. Drag the test step into the inner box of the condition (you can also add the test step directly under the condition).

If

When there are multiple conditional judgments in the test process, you can distinguish the steps performed by the process by adding judgment conditions (If). That is, when the conditions of the judgment configuration are met, the sub-step under the judgment condition will be executed, and the sub-step will be skipped.

Example: The pet store owner determines that the pet is sold based on yesterday's sales and sets the pet's sale status to "Sold". Otherwise, query the list for sale.

    1. Click the button "Tests Step" at the bottom and select Conditional branch.
    1. In the input box behind the lf condition, fill in the variable saleStatus obtained by the request API, select the condition "Equals", and finally enter the comparison value as true. (When the sales status is judged to be true, change the pet information to "Sold")
    1. Hover over the conditional branch to stop "+ Else", click and add the "Pet List for Sale" step (otherwise, query the list of pets on sale.) )
    1. Drag the test step into the appropriate conditional branch.

Wait

When a step in the test process needs to wait for a certain period of time after execution, such as step A needs to wait for a certain amount of time before executing step B, you can solve it by adding a waiting condition.

Example: A simulated user views pet details, views for 1000ms, and then updates the browsing status in the pet details.

    1. Click the button "Tests Step" at the bottom and select "Wait".
    1. Enter the time to wait 1000 (in milliseconds).