Mock Data
Generate test data in 7 formats with one click, fully meeting data-driven testing needs
Core Features Overview
1. Multi-Format Support
Supports generating 7 common data formats to meet different testing scenarios
2. Flexible Storage Options
Storage Location | Use Case | Access Method |
---|---|---|
Data Space | Team-shared data | AngusTester "Data"→"File Data"→"Space" |
Data Source | Database storage | AngusTester "Data"→"Source Data"→"Data Source" |
Local Storage | Single test usage | ${AGENT_HOME}/data/exec/[ExecutionID]/data.[format] |
Third-party System | External system integration | Via API push |
3. Data Parameterization
✅ Immediately available for reference in test scripts after generation
✅ Supports field-level dynamic generation rules
✅ Batch generation of massive test data
Data Format Plugins Overview
Format | Plugin Name | Storage Support | Package |
---|---|---|---|
CSV | MockCsv | Data Space/Local/Third-party | csv-mock-plugin-1.0.0.zip |
JSON | MockJson | Data Space/Local/Third-party | json-mock-plugin-1.0.0.zip |
Excel | MockExcel | Data Space/Local/Third-party | excel-mock-plugin-1.0.0.zip |
SQL | MockSql | Data Space/Data Source/Local/Third-party | sql-mock-plugin-1.0.0.zip |
XML | MockXml | Data Space/Local/Third-party | xml-mock-plugin-1.0.0.zip |
TAB | MockTab | Data Space/Local/Third-party | tab-mock-plugin-1.0.0.zip |
Custom | MockCustom | Data Space/Local/Third-party | custom-mock-plugin-1.0.0.zip |
💡 Plugins are automatically deployed in
${AGENT_HOME}/plugins/
directory on agent nodes
Typical Use Cases
Case 1: Generate CSV Test Data
yaml
task:
mockData:
fields:
- name: username
value: "@String(3,20)"
- name: password
value: "@String(6,32)"
settings:
format: CSV
rows: 100000
location: LOCAL
Case 2: Generate JSON Test Data
yaml
task:
mockData:
fields:
- name: userId
value: "@Number(1000,9999)"
- name: email
value: "@Email"
settings:
format: JSON
rows: 50000
rowsToArray: true
Case 3: Direct SQL Data Insertion
yaml
task:
mockData:
settings:
format: SQL
location: DATASOURCE
storeDatasource:
type: MYSQL
jdbcUrl: jdbc:mysql://mysql01-sample.angusmock.cloud:3306/db
username: user
password: pass
Case 4: Upload to Third-party System
yaml
task:
mockData:
settings:
location: DATASPACE
storeRequest:
url: https://api.example.com/upload
parameters:
- name: Content-Type
in: header
enabled: true
type: string
value: multipart/form-data
- name: Authorization
in: header
enabled: true
type: string
value: "Bearer {token}"
Case 5: Excel Data Generation Notes
yaml
# Linux systems require font library installation first:
# Ubuntu: sudo apt-get install fontconfig
# CentOS: yum install -y fontconfig
task:
mockData:
settings:
format: EXCEL
rows: 10000
Advanced Configuration Parameters
Parameter | Description | Example Value |
---|---|---|
batchRows | Batch generation row count | 200 |
lineEnding | Line ending | UNIT_LF (Linux)/WIN_CRLF (Windows) |
separatorChar | Field separator (custom format) | ` |
escapeChar | Escape character | \ |
includeHeader | Include column headers | true/false |
batchInsert | SQL batch insertion | true/false |