Skip to content

Mock Service Management

The AngusTester Mock Service Management module supports full lifecycle management of mock services, including service creation, configuration optimization, interface management, and operation monitoring. Operations are divided into four parts: service management, configuration management, interface management, and operation monitoring.

I. Basic Service Management

1. Create Mock Service

Description: Establish a new mock service instance
Steps:

  1. Mock Service Click "Add Mock Service"
  2. Select creation method:
    • Manual Creation: Enter domain + port
    • Associate Import: Bind existing service interfaces
    • File Import: Upload Swagger/Postman files

      ⚠️ Node/IP binding cannot be modified after setup

2. Service Start/Stop Control

Description: Manage mock service running status
Steps:

  • Start Service:
    1. Inactive Service Click "Start"
    2. Status changes to Running (~30 sec)
  • Stop Service:
    1. Running Service Click "Stop"
    2. Status changes to Stopped

3. Service Instance Refresh

Description: Force synchronization of latest configurations to running instances
Steps:

  1. Running Service Click "Refresh Instance"
  2. System automatically:
    • Reloads interface configurations
    • Applies security policies
    • Preserves connection sessions
      Takes ~5-10 seconds

II. Service Configuration Management

1. Basic Information Editing

Description: Update service identification information
Steps:

  1. Service Details → Settings → Basic Info
  2. Modify fields:
    • Service name
    • Description
    • Tags

      ❗ Domain/IP cannot be modified

2. Service Parameter Configuration

Description: Optimize service performance parameters
Steps:

  1. Service Details → Settings → Service Config
  2. Key parameters:
    • Thread count (100-10000)
    • File log level (BASIC/FULL)
    • Max request body (1MB-1GB)

      ⚠️ Requires instance refresh to take effect

3. Interface Security Settings

Description: Configure access authorization policies
Steps:

  1. Service Details → Settings → API Security Toggle switch ON
  2. Add credentials:
    • API Key (name + value)
    • Basic Auth (username + password)
    • OAuth2.0 (token)

      ❗ Unauthorized requests return 401

4. CORS Policy Configuration

Description: Manage CORS access rules
Steps:

  1. Service Details → Settings → CORS Toggle switch ON
  2. Configuration items:
    • Allowed domains (supports wildcards)
    • Allowed methods (GET/POST etc.)
    • Exposed headers

      Requires service restart

III. Interface & Data Management

1. Interface List View

Description: Manage mock interface inventory
Steps:

  1. Service Details → Interfaces
  2. View dimensions:
    • Interface path (with parameters)
    • Response examples
    • Last modified time

2. Request Record Audit

Description: Track historical call details
Steps:

  1. Service Details → Requests
  2. Analysis fields:
    • Request timestamp
    • Status code distribution
    • Request body summary

      Last 1000 records retained

3. Export Mock Scripts

Description: Backup interface configuration scripts
Steps:

  1. Service List Click "Export" on target service
  2. Download formats:
    • JSON (standard structure)
    • YAML (compact format)

IV. Service Monitoring & Maintenance

1. Service Log View

Description: Diagnose runtime exceptions
Steps:

  1. Service Details → Logs
  2. Filter types:
    • Start/Stop records
    • Configuration changes
    • Exception stacks

      Logs retained for 7 days

2. Resource Monitoring

Description: Analyze service performance metrics
Steps:

  1. Service Details → Monitor
  2. Core metrics:
    • CPU/Memory usage
    • Request throughput (QPS)
    • Response time chart

3. Activity Record Tracing

Description: Audit key operation history
Steps:

  1. Service Details → Activities
  2. View operations:
    • Configuration changes (field-level comparison)
    • Service start/stop
    • Interface additions/deletions

4. Delete Mock Service

Description: Clean up idle service resources
Steps:

  1. Service List Select target service
  2. Click "Delete" icon
  3. Confirm by entering service name
    ⚠️ Running services must be stopped first

Released under the GPL-3.0 License.