All Products
Search
Document Center

Performance Testing:Use a parameter instruction

Last Updated:Nov 01, 2024

You can use a parameter instruction to complete configurations such as file parameter redefinition and single data polling. This topic describes how to use a parameter instruction.

Background information

You can use a parameter instruction to complete the following configurations:

  • Parameter redefinition: Redefine global parameters, including custom parameters and file parameters.

  • File parameters: Specify a parameter from the global parameter file as the base column based on your business requirements to maximize the use of all data in the parameter file.

You can use parameter instructions together with parameter file creation instructions. For more information, see File data sources.

You must take note of the following items:

  • When you configure file parameters, you cannot modify the parameter names. If you want to modify a parameter name, you must redefine the parameter on the Custom Parameters tab.

  • You can configure one of the Use Once and Baseline Column parameters. If you configure the Use Once parameter, you cannot configure the Baseline Column parameter.

  • You cannot configure the empty parameter in a non-draft state.

  • Parameter instructions are suitable for the current business session.

Parameter settings for data sources

For example, the user.csv parameter file contains the q1 and q2 parameters, and you want to use q1 as the baseline column. You can perform the following operations to complete the setting:

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

  2. Configure basic request parameters for the HTTP node. For more information, see Basic request parameters.

  3. Add a parameter file to the data source. For more information, see Add parameter files to data sources

  4. In the Business Session section, click the Add Instruction drop-down list and select Parameter.

  5. Expand Parameter. On the Data Source Parameters tab, add the q1 and q2 parameters based on your business requirements.

    Parameter

    Description

    Access Mode

    You can select Random or In Order.

    Use Once

    Data is used only once in testing. The parameter for which Use Once is enabled is used as the baseline column.

    Baseline Column

    The parameter for which Baseline Column is enabled is used as the combination basis of data in other columns. For example, the baseline column contains 100 rows. If the number of rows in a non-baseline column exceeds 100, the excess rows in the column are deleted. If the number of rows in a non-baseline column is less than 100, the rows are repeated until the number reaches 100. Then, combination operations can be performed. In this example, q1 is used as the baseline column.

Custom parameters

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

  2. Configure basic request parameters for the HTTP node. For more information, see Basic request parameters.

  3. Add a parameter file to the data source.

  4. In the Business Session section, click the Add Instruction drop-down list and select Parameter.

  5. Expand Parameter. On the Custom Parameters tab, configure the Parameter Name and Parameter Logic parameters.