Skip to content

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 LocationUse CaseAccess Method
Data SpaceTeam-shared dataAngusTester "Data"→"File Data"→"Space"
Data SourceDatabase storageAngusTester "Data"→"Source Data"→"Data Source"
Local StorageSingle test usage${AGENT_HOME}/data/exec/[ExecutionID]/data.[format]
Third-party SystemExternal system integrationVia 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

FormatPlugin NameStorage SupportPackage
CSVMockCsvData Space/Local/Third-partycsv-mock-plugin-1.0.0.zip
JSONMockJsonData Space/Local/Third-partyjson-mock-plugin-1.0.0.zip
ExcelMockExcelData Space/Local/Third-partyexcel-mock-plugin-1.0.0.zip
SQLMockSqlData Space/Data Source/Local/Third-partysql-mock-plugin-1.0.0.zip
XMLMockXmlData Space/Local/Third-partyxml-mock-plugin-1.0.0.zip
TABMockTabData Space/Local/Third-partytab-mock-plugin-1.0.0.zip
CustomMockCustomData Space/Local/Third-partycustom-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

ParameterDescriptionExample Value
batchRowsBatch generation row count200
lineEndingLine endingUNIT_LF (Linux)/WIN_CRLF (Windows)
separatorCharField separator (custom format)`
escapeCharEscape character\
includeHeaderInclude column headerstrue/false
batchInsertSQL batch insertiontrue/false

Released under the GPL-3.0 License.