Skip to content

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 NameTypeRequiredConstraintsDescription
iterationsintegerNo1-10 billionNumber of sampling iterations per thread (functional testing limited to ≤200)
durationstringNo1s-86400s (24 hours)Maximum task execution duration (default: 30s if not configured)
threadobjectYes-Concurrency thread configuration (see Thread Configuration below)
onErrorobjectNo-Error handling strategy (see Error Handling below)
priorityintegerNo1-2147483647Task priority (default: 1000; higher values indicate higher priority)
startModeenumNo-Startup mode: IMMEDIATELY (immediate) / TIMING (scheduled)
startAtDatedateNo-Scheduled execution time (format: yyyy-MM-dd HH:MM:SS)
startupTimeoutstringNo1s-7200s (2 hours)Timeout for Agent to start Runner (default: 1 minute)
runnerSetupTimeoutstringNo1s-7200sRunner initialization timeout (default: 1 minute)
shutdownTimeoutstringNo1s-7200sExecution stop timeout (default: 3 seconds)
nodeSelectorsobjectNo-Node selection strategy (see Node Configuration below)
reportIntervalstringNo1s-300sResult sampling interval (default: 5 seconds)
langenumNo-Output language: zh_CN (Simplified Chinese) / en (English)
variablesobject[]No≤200Parameterized variables (refer to "Parameterization" documentation)
updateVariableByIterationbooleanNo-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:
  1. The number of times each thread executes test steps (subtasks) in a loop
  2. 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 TypeCalculation FormulaExample (Total iterations: 10001, Nodes: 10)
First (N-1) NodesTotal iterations ÷ Number of nodes (rounded down)10001 ÷ 10 = 1000
Last NodeTotal iterations ÷ Number of nodes + Total iterations % Number of nodes1000 + (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 TypeAllocation FormulaExample (Total threads: 10001, Nodes: 10)
First (N-1) NodesTotal threads ÷ Number of nodes (rounded down)10001 ÷ 10 = 1000
Last NodeTotal threads ÷ Number of nodes + Total threads % Number of nodes1000 + 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 NameTypeRequiredConstraintsDescription
threadsintegerYes1-10000Maximum concurrent threads (Mock data tasks limited to ≤1000, functional testing limited to =1)
rampUpIntervalintegerNo1s-86400sThread ramp-up time (must be ≤ total duration)
rampUpThreadsintegerNo1-10000Threads added per ramp-up phase (must be ≤ max threads)
rampDownIntervalstringNo1s-86400sThread ramp-down time (must be ≤ total duration)
rampDownThreadsintegerNo1-10000Threads reduced per ramp-down phase (must be ≤ max threads)
resetAfterRampboolNo-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 NameTypeRequiredConstraintsDescription
actionenumYes-Error response: CONTINUE (continue) / STOP (stop) / STOP_NOW (stop immediately)
sampleErrorbooleanYes-Whether to collect error details (default: true)
sampleErrorNumintegerNo1-200Maximum error samples (default: 20)
yaml
onError:  
  action: CONTINUE  
  sampleError: true  
  sampleErrorNum: 10

Node Selection (nodeSelectors)

Configures the task execution environment.

Field NameTypeRequiredConstraintsDescription
numintegerNo1-200Number of execution nodes (default: 1)
availableNodeIdsinteger[]No1-200Available node ID range (auto-selected if unspecified)
appNodeIdsinteger[]No1-200Node IDs where the tested application resides
strategyobjectNo-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 NameTypeRequiredConstraintsDescription
enabledbooleanYes-Enable intelligent node selection (default: false)
maxTaskNumintegerNo1-1000Maximum tasks per node (0 = unlimited)
lastExecutedbooleanNo-Prioritize nodes used in the last execution
specEnabledbooleanNo-Enable hardware specification filtering
cpuSpecintegerNo1-64Minimum CPU cores
memorySpecstringNo1-512GBMinimum memory size
diskSpecstringNo1-2000GBMinimum disk space
idleRateEnabledbooleanNo-Enable resource idle rate filtering
cpuIdleRatestringNo≤100%Minimum CPU idle rate
memoryIdleRatestringNo≤100%Minimum memory idle rate
diskIdleRatestringNo≤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.

Released under the GPL-3.0 License.