AngusTester Script Specification
Unified standards empower efficient script development with dual YAML/JSON format support
Specification Overview
The AngusTester script specification defines the standard format for automated testing, ensuring scripts have:
- Consistency - Unified standards for team collaboration
- Maintainability - Clear structure for easy maintenance
- Extensibility - Flexible adaptation for future needs
- Compatibility - Version control and compatibility features
Supports both YAML and JSON mainstream formats to meet different scenario requirements.
Format Comparison Examples
YAML Format Example
yaml
specification: angus/1.0.0 #Spec version
apiVersion: api/v1 #API version
info: #Metadata
name: This is an example of a basic script structure.
tags: #Tag info
- BenchmarkTesting
type: TEST_PERFORMANCE #Test type
plugin: Http #Plugin
configuration: #Execution config
iterations: 100000
duration: 30s
thread:
threads: 100
onError:
action: CONTINUE
sampleError: true
sampleErrorNum: 10
priority: 1000
reportInterval: 5s
task: #Task
pipelines:
- target: HTTP
request:
method: GET
url: http://serv01-sample.angusmock.cloud:30010/benchmark
JSON Format Example
json
{
"specification": "angus/1.0.0",
"apiVersion": "api/v1",
"info": {
"name": "This is an example of a basic script structure."
},
"tags": [
"BenchmarkTesting"
],
"type": "TEST_PERFORMANCE",
"plugin": "Http",
"configuration": {
"iterations": 100000,
"duration": "30s",
"thread": {
"threads": 100
},
"onError": {
"action": "CONTINUE",
"sampleError": true,
"sampleErrorNum": 10
},
"priority": 1000,
"reportInterval": "5s"
},
"task": {
"pipelines": [
{
"target": "HTTP",
"request": {
"method": "GET",
"url": "http://serv01-sample.angusmock.cloud:30010/benchmark"
}
}
]
}
}
Format Selection Recommendations
Scenario | Recommended Format | Advantages |
---|---|---|
Manual script writing | YAML | Highly readable, clear structure |
Program-generated scripts | JSON | Program-friendly, good compatibility |
Complex scenario scripts | YAML | Supports comments, easier maintenance |
API data transfer | JSON | Universal standard, convenient transmission |