All Products
Search
Document Center

Performance Testing:Custom parameter

Last Updated:Dec 06, 2024

You can specify custom parameters for Performance Testing (PTS). You can also specify custom parameters to redefine parameters during parameter passing. The custom parameters for performance testing consist of global and business session parameters. This topic describes how to specify custom global and business session parameters.

Specify custom global parameters

Specified custom global parameters take effect during the performance testing for a scenario. To specify custom global parameters, perform the following steps:

Procedure

  1. Log on to the PTS console, choose Performance Test > Create Scenario, and then click PTS.

  2. Create a performance testing scenario. For more information, see Create a PTS-based performance testing scenario.

  3. On the PTS Scenario page, click Parameters at the bottom of the page. image

  4. On the Custom Parameters tab, enter the Parameter Name and Parameter Logic, and then click Confirm.

    Important
    • Custom Parameters can contain only strings and system functions. File parameters and output parameters are not allowed.

    • If system functions are included in the Custom Parameters and the parameter is used on two APIs in a business session, the values on both APIs in the business session (transaction) of the same virtual user are the same.

Scenarios

When performance testing is performed in different environments, the definitions of tested APIs remain the same, except for the domain names of the APIs. In this case, you can specify the domain name as the domain variable. This way, the API information can use http://${domain}. When you change the tested environment, you need only to modify the domain variable to change all API domain names. This improves the performance testing efficiency.

  1. Configure Custom Parameters domain.

    image

  2. Usehttp://${domain} in the API configuration. For more information, see the following figure.

    image

Specify custom business session parameters

You can also specify custom business session parameters on the PTS Scenario page. Specified custom business session parameters take effect throughout the entire business session where an instruction is configured. For more information, see Custom parameters.