Parameter instructions control how PTS reads and combines data from your parameter files during a load test. Use them to override global parameters, designate a baseline column for row alignment, or enforce single-use data consumption.
Parameter instructions work together with parameter file configuration. For details on uploading and managing parameter files, see File data sources.
Configure data source parameters
Data source parameters control how PTS reads rows from your parameter file and how columns align with each other. The following procedure uses a user.csv file with two columns (q1 and q2) to demonstrate how to set q1 as the baseline column.
Log on to the PTS console. Choose Performance Test > Create Scenario, and then click PTS.
Configure basic request parameters for the HTTP node. For details, see Basic request parameters.
Add a parameter file to the data source. For details, see Add parameter files to data sources.
In the Business Session section, open the Add Instruction drop-down list and select Parameter.
Expand Parameter. On the Data Source Parameters tab, add the
q1andq2parameters.Configure the settings described in the following table.
Data source parameter settings
Parameter | Description |
Access Mode | Determines how rows are read from the parameter file. Random: rows are picked in random order. In Order: rows are read sequentially from top to bottom. |
Use Once | When enabled, each data row is consumed only once during the test. The column with Use Once enabled automatically becomes the baseline column. Mutually exclusive with Baseline Column. |
Baseline Column | Designates a column as the alignment basis for all other columns. PTS adjusts non-baseline columns to match the baseline column's row count. Mutually exclusive with Use Once. |
Select the right access mode
Access mode | When to use | Example scenario |
Random | Data order does not matter. | Search keywords, product IDs, randomized test inputs |
In Order | Data must be consumed sequentially or each row must be unique. | Login credentials, sequential transaction IDs, time-series entries |
How baseline column alignment works
When you designate a column as the baseline, PTS aligns all other columns to match its row count. Consider the following example where q1 (the baseline column) has 100 rows:
Non-baseline column rows | What PTS does | Result |
150 rows | Truncates to match the baseline | Only the first 100 rows are used. |
50 rows | Repeats rows to fill the baseline count | The 50 rows cycle twice to produce 100 entries. |
After alignment, PTS combines the columns row by row to create the final data set used during the test.
Step-by-step example:
Suppose q1 has values [A, B, C] (3 rows) and q2 has values [1, 2, 3, 4, 5] (5 rows). With q1 as the baseline column:
PTS uses all 3 rows of
q1as the target row count.PTS truncates
q2from 5 rows to 3 rows:[1, 2, 3].PTS pairs the columns row by row:
Row | q1 (baseline) | q2 (truncated) |
1 | A | 1 |
2 | B | 2 |
3 | C | 3 |
Now suppose q1 has 3 rows and q2 has only 2 rows [1, 2]. With q1 as the baseline column:
PTS repeats
q2to reach 3 rows:[1, 2, 1].PTS pairs the columns row by row:
Row | q1 (baseline) | q2 (repeated) |
1 | A | 1 |
2 | B | 2 |
3 | C | 1 |
Plan your data volume carefully when Use Once is enabled. Make sure your parameter file contains enough rows to cover the expected number of iterations across all virtual users.
Create custom parameters
Custom parameters allow you to redefine global parameters, including file parameters. Use custom parameters to rename file parameters or apply custom processing to your test data.
Log on to the PTS console. Choose Performance Test > Create Scenario, and then click PTS.
Configure basic request parameters for the HTTP node. For details, see Basic request parameters.
In the Business Session section, open the Add Instruction drop-down list and select Parameter.
Expand Parameter. On the Custom Parameters tab, configure the Parameter Name and Parameter Logic fields.
File parameter names cannot be modified directly on the Data Source Parameters tab. To modify a parameter name, redefine the parameter on the Custom Parameters tab.
Constraints
Constraint | Description |
Renaming file parameters | File parameter names cannot be modified on the Data Source Parameters tab. Redefine the parameter on the Custom Parameters tab instead. |
Use Once and Baseline Column exclusivity | Use Once and Baseline Column are mutually exclusive. Enabling one disables the other. |
Non-draft state restriction | Empty parameters cannot be configured when the scenario is not in draft state. |
Scope | Parameter instructions apply only to the current business session. |