Execution Configuration
Configuration
is used to precisely control the runtime parameters of test tasks and serves as the core control module for scripts. The following configurations apply to all plugin-based test tasks.
Primary Parameter List
Field Name | Type | Required | Constraints | Description |
---|---|---|---|---|
iterations | integer | No | 1-10 billion | Number of sampling iterations per thread (functional testing limited to ≤200) |
duration | string | No | 1s-86400s (24 hours) | Maximum task execution duration (default: 30s if not configured) |
thread | object | Yes | - | Concurrency thread configuration (see Thread Configuration below) |
onError | object | No | - | Error handling strategy (see Error Handling below) |
priority | integer | No | 1-2147483647 | Task priority (default: 1000; higher values indicate higher priority) |
startMode | enum | No | - | Startup mode: IMMEDIATELY (immediate) / TIMING (scheduled) |
startAtDate | date | No | - | Scheduled execution time (format: yyyy-MM-dd HH:MM:SS) |
startupTimeout | string | No | 1s-7200s (2 hours) | Timeout for Agent to start Runner (default: 1 minute) |
runnerSetupTimeout | string | No | 1s-7200s | Runner initialization timeout (default: 1 minute) |
shutdownTimeout | string | No | 1s-7200s | Execution stop timeout (default: 3 seconds) |
nodeSelectors | object | No | - | Node selection strategy (see Node Configuration below) |
reportInterval | string | No | 1s-300s | Result sampling interval (default: 5 seconds) |
lang | enum | No | - | Output language: zh_CN (Simplified Chinese) / en (English) |
variables | object[] | No | ≤200 | Parameterized variables (refer to "Parameterization" documentation) |
updateVariableByIteration | boolean | No | - | Update variables per iteration (enabled by default) |
A complete execution configuration example:
yaml
configuration:
iterations: 100000000
duration: 180s
thread:
threads: 5000
rampUpInterval: 60s
rampUpThreads: 1000
rampDownInterval: 60s
rampDownThreads: 1000
resetAfterRamp: true
onError:
action: CONTINUE
sampleError: true
sampleErrorNum: 10
priority: 1000
startMode: IMMEDIATELY
startAtDate: 2023-11-09 10:10:00
startupTimeout: 1min
runnerSetupTimeout: 1min
shutdownTimeout: 10s
nodeSelectors:
num: 2
availableNodeIds:
- 182283969729922201
- 182283969729922202
- 182283969729922203
appNodeIds:
- 182283969729922204
- 182283969729922205
- 182283969729922206
strategy:
enabled: true
maxTaskNum: 0
lastExecuted: false
specEnabled: true
cpuSpec: 16
memorySpec: 16GB
diskSpec: 500MB
idleRateEnabled: true
cpuIdleRate: 80%
memoryIdleRate: 80%
diskIdleRate: 20%
reportInterval: 5s
lang: zh_CN
variables:
- name: MyAuthorization
value: Bearer f4390d2a-895e-4711-a7a5-0ee0670dab40
updateVariableByIteration: false
Parameter Details
Sampling Iterations (iterations)
- Iterations refer to the number of times a single virtual user (thread) completes the full test cycle. It controls:
- The number of times each thread executes test steps (subtasks) in a loop
- All steps within the same iteration share execution context (variables, sessions, etc.)
- Multi-node distribution rules:
When tests are executed across N nodes, the total iterations are allocated as follows:
Node Type Calculation Formula Example (Total iterations: 10001, Nodes: 10) First (N-1) Nodes Total iterations ÷ Number of nodes (rounded down)
10001 ÷ 10 = 1000
Last Node Total iterations ÷ Number of nodes + Total iterations % Number of nodes
1000 + (10001 % 10) = 1001
Algorithm characteristics:
- Load Balancing: Ensures most nodes share an even load
- Integrity Guarantee: The last node handles the remainder
- Precision Assurance: Total iterations strictly equal the sum of iterations across all nodes
Thread Configuration (thread)
- Threads are the core mechanism for simulating real user concurrency. Each thread represents an independent virtual user capable of executing a complete sequence of operations:
- Accessing application interfaces
- Browsing web content
- Submitting form data
- Sending message requests
- Multi-node thread allocation rules:
When a test task is distributed across multiple nodes, the total threads are allocated as follows:
Node Type Allocation Formula Example (Total threads: 10001, Nodes: 10) First (N-1) Nodes Total threads ÷ Number of nodes (rounded down)
10001 ÷ 10 = 1000
Last Node Total threads ÷ Number of nodes + Total threads % Number of nodes
1000 + 1 = 1001
Algorithm characteristics:
- Load Balancing: Most nodes carry the same load
- Remainder Handling: The last node takes the extra load
- Exact Matching: The sum of threads across nodes strictly equals the total threads
Field Name | Type | Required | Constraints | Description |
---|---|---|---|---|
threads | integer | Yes | 1-10000 | Maximum concurrent threads (Mock data tasks limited to ≤1000, functional testing limited to =1) |
rampUpInterval | integer | No | 1s-86400s | Thread ramp-up time (must be ≤ total duration) |
rampUpThreads | integer | No | 1-10000 | Threads added per ramp-up phase (must be ≤ max threads) |
rampDownInterval | string | No | 1s-86400s | Thread ramp-down time (must be ≤ total duration) |
rampDownThreads | integer | No | 1-10000 | Threads reduced per ramp-down phase (must be ≤ max threads) |
resetAfterRamp | bool | No | - | Reset sampling data after thread adjustment (default: false) |
yaml
thread:
threads: 5000
rampUpInterval: 60s
rampUpThreads: 1000
rampDownInterval: 60s
rampDownThreads: 1000
resetAfterRamp: true
Error Handling (onError)
Defines exception handling mechanisms.
Field Name | Type | Required | Constraints | Description |
---|---|---|---|---|
action | enum | Yes | - | Error response: CONTINUE (continue) / STOP (stop) / STOP_NOW (stop immediately) |
sampleError | boolean | Yes | - | Whether to collect error details (default: true) |
sampleErrorNum | integer | No | 1-200 | Maximum error samples (default: 20) |
yaml
onError:
action: CONTINUE
sampleError: true
sampleErrorNum: 10
Node Selection (nodeSelectors)
Configures the task execution environment.
Field Name | Type | Required | Constraints | Description |
---|---|---|---|---|
num | integer | No | 1-200 | Number of execution nodes (default: 1) |
availableNodeIds | integer[] | No | 1-200 | Available node ID range (auto-selected if unspecified) |
appNodeIds | integer[] | No | 1-200 | Node IDs where the tested application resides |
strategy | object | No | - | Intelligent node selection strategy (see Strategy Configuration below) |
yaml
nodeSelectors:
num: 2
availableNodeIds: [182283969729922201, 182283969729922202, 182283969729922203]
appNodeIds: [182283969729922204, 182283969729922205, 182283969729922206]
strategy:
# Strategy configuration below
Node Strategy (strategy)
Intelligent node selection rules.
Field Name | Type | Required | Constraints | Description |
---|---|---|---|---|
enabled | boolean | Yes | - | Enable intelligent node selection (default: false) |
maxTaskNum | integer | No | 1-1000 | Maximum tasks per node (0 = unlimited) |
lastExecuted | boolean | No | - | Prioritize nodes used in the last execution |
specEnabled | boolean | No | - | Enable hardware specification filtering |
cpuSpec | integer | No | 1-64 | Minimum CPU cores |
memorySpec | string | No | 1-512GB | Minimum memory size |
diskSpec | string | No | 1-2000GB | Minimum disk space |
idleRateEnabled | boolean | No | - | Enable resource idle rate filtering |
cpuIdleRate | string | No | ≤100% | Minimum CPU idle rate |
memoryIdleRate | string | No | ≤100% | Minimum memory idle rate |
diskIdleRate | string | No | ≤100% | Minimum disk idle rate |
yaml
strategy:
enabled: true
maxTaskNum: 0
lastExecuted: false
specEnabled: true
cpuSpec: 16
memorySpec: 16GB
diskSpec: 500MB
idleRateEnabled: true
cpuIdleRate: 80%
memoryIdleRate: 80%
diskIdleRate: 20%
Execution Notes
Ensure the target node Agent status is "Connected"; otherwise, task scheduling will fail.