Plugin Configuration Parameters
Plugin Configuration Parameters
are used to specify external dependencies and control parameters for plugins during script execution.
Main Parameter List
Parameter | Type | Required | Description |
---|---|---|---|
ignoreAssertions | boolean | No | Assertion Handling Strategy true: Ignore assertion errors (default) false: Record assertion failures as sampling errors |
updateTestResult | boolean | No | Test Result Update true: Synchronize updates to API/case/scenario records false: Preserve existing records (default) |
httpSetting | object | No | HTTP Protocol Configuration Effective when testing HTTP interfaces |
webSocketSetting | object | No | WebSocket Protocol Configuration Effective when testing WebSocket protocols |
jdbcSetting | object | No | Database Connection Configuration Required for testing database protocols |
Configuration Tip
Only configure the corresponding parameters when specific protocols are used in the script.
A complete configuration example:
yaml
task:
arguments:
ignoreAssertions: false
updateTestResult: false
httpSetting:
connectTimeout: 6s
readTimeout: 60s
retryNum: 0
maxRedirects: 1
webSocketSetting:
connectTimeout: 6s
responseTimeout: 60s
maxReconnections: 0
reconnectionInterval: 200ms
jdbcSetting:
type: MYSQL
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/db
username: root
password: '******'
pool:
name: hikari
maximumPoolSize: 32
minimumIdle: 10
maxWaitTimeoutMillis: 60000
HTTP Plugin Configuration (httpSetting)
Parameter | Type | Range | Default | Description |
---|---|---|---|---|
connectTimeout | string | 1s ~ 24h | 3s | Maximum wait time for TCP connection establishment |
readTimeout | string | 1s ~ 24h | 60s | Maximum wait time for server response |
retryNum | integer | 0~6 | 0 | Number of automatic retries for failed requests |
maxRedirects | integer | 0~10 | 1 | Maximum number of 3xx redirect follow-ups |
Recommended Configuration:
yaml
httpSetting:
connectTimeout: 5s # 1-3 seconds recommended for production environments
readTimeout: 30s # 30 seconds recommended for API services
retryNum: 0 # Enable retries for critical services
maxRedirects: 3 # Increase for web page testing
WebSocket Plugin Configuration (webSocketSetting)
Parameter | Type | Range | Default | Description |
---|---|---|---|---|
connectTimeout | string | 1s ~ 24h | 3s | Maximum wait time for connection establishment |
responseTimeout | string | 1s ~ 24h | 60s | Maximum wait time for message response |
maxReconnections | integer | 0~100 | 0 | Maximum number of reconnections after disconnection |
reconnectionInterval | string | 1ms~30m | 200ms | Interval between reconnection attempts |
Scenario Optimization Suggestions:
yaml
webSocketSetting:
connectTimeout: 3s # Can be reduced to 1 second for intranet environments
responseTimeout: 10s # 5-10 seconds recommended for instant messaging
maxReconnections: 3 # Recommended to disable
reconnectionInterval: 1s # 1-second retry interval
JDBC Plugin Configuration (jdbcSetting)
Field Name | Type | Required | Length Limit | Description |
---|---|---|---|---|
type | enum | Yes | / | Database type. Supported types: H2, HSQLDB, SQLITE, POSTGRES, MARIADB, MYSQL, ORACLE, SQLSERVER, DB2. |
driverClassName | string | No | 200 | Database driver class name, e.g., com.mysql.cj.jdbc.Driver . |
jdbcUrl | string | No | 2048 | Database connection URL, e.g., jdbc:mysql://localhost:3306/mydatabase . |
username | string | No | 200 | Database username. |
password | string | No | 1024 | Database password. |
isolation | enum | No | / | Transaction isolation level: - TRANSACTION_READ_UNCOMMITTED (Read Uncommitted),- TRANSACTION_READ_COMMITTED (Read Committed),- TRANSACTION_REPEATABLE_READ (Repeatable Read),- TRANSACTION_SERIALIZABLE (Serializable). |
pool | object | No | / | Connection pool configuration. |
yaml
jdbcSetting:
type: MYSQL
driverClassName: com.mysql.cj.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost:3306/db
username: root
password: root123
pool:
name: hikari
maximumPoolSize: 32
minimumIdle: 1
maxWaitTimeoutMillis: 60000
JDBC Connection Pool Configuration (pool)
Parameter | Range | Required | Description |
---|---|---|---|
name | - | Yes | Connection pool type: hikari /druid , etc. |
maximumPoolSize | 1~10000 | Yes | Maximum number of connections |
minimumIdle | 1~10000 | Yes | Minimum idle connections |
maxWaitTimeoutMillis | 0~210M | No | Connection acquisition timeout (ms) |
yaml
pool:
name: hikari
maximumPoolSize: 32
minimumIdle: 10
maxWaitTimeoutMillis: 60000