Mock Service
AngusMockService
is a high-performance mock container specifically designed for API testing.- Capable of handling 200,000+ HTTP requests per second on an
8-core CPU
.- It overcomes the limitations of traditional mock tools by providing deep behavioral simulation and real-time monitoring, offering a complete solution for authentic API scenario emulation.
Click to view: Install AngusMockService
Core Advantages
Advantage | Description | Value |
---|---|---|
High Performance | Supports 200,000+ requests/sec on 8-core CPU | Meets high-concurrency stress testing needs |
Deep Behavioral Simulation | Supports delays, error states, faulty responses, etc. | Covers real business scenarios |
Real-time Monitoring | Visual tracking of requests/responses | Quickly identifies root causes |
Flexible Integration | Seamlessly integrates with testing workflows | Improves testing iteration efficiency |
Team Collaboration | Service authorization and sharing mechanisms | Facilitates cross-team collaboration |
Management Features
Web Console Operations
Service Management
- Create/Start/Stop/Delete services
- Service authorization and sharing
- Resource monitoring (CPU/Memory/Disk)
Configuration Center
- Interface security configuration
- CORS settings
- Log level adjustment
Service Information Query
Get Service Status
bash
> curl -i http://serv01-sample.angusmock.cloud:30010
HTTP/1.1 200 OK
XC-Mock-ServiceId: 203883811233071109
XC-Mock-RequestId: ed8d92ad-9e54-4879-93e5-8530991d6a03
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD
Content-Type: application/json
content-length: 1385
{
"app" : "AngusMockService",
"version" : "1.0.0",
"health" : {
"status" : {
"status" : "UP"
}
},
"uptime" : "354851407",
"home" : "/opt/AngusAgent-Full-1.0.0/",
"principal" : {
"angusmock.principal.deviceId" : "203883980884279296",
"angusmock.principal.mockServiceId" : "203883811233071109",
"angusmock.principal.tenantId" : "1"
},
"server" : {
"port" : 30010,
"ip" : "172.24.76.61"
},
"diskSpace" : {
"total" : "63278391296",
"used" : "4786548736"
},
"info" : {
"id" : "203883811233071109",
"name" : "Shared Mock Service 01",
"nodeId" : "203883980884279296",
"serviceDomainUrl" : "http://serv01-sample.angusmock.cloud:30010",
"serviceHostUrl" : "http://172.24.76.61:30010",
"auth" : true,
"apisCors" : {
"allowCorsOrigin" : "*",
"allowCorsCredentials" : true,
"allowCorsRequestMethods" : "GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD",
"enabled" : true
},
"setting" : {
"useSsl" : false,
"workThreadNum" : 256,
"enableNettyLog" : false,
"logFileLevel" : {
"value" : "NONE",
"message" : "None"
},
"sendRequestLog" : false,
"maxContentLength" : 1048576000,
"workPushbackThreadNum" : 8,
"maxPushbackConnectTimeout" : 5000,
"maxPushbackRequestTimeout" : -1
}
}
}
View Interface Configuration
bash
> curl -i http://120.55.169.231:30010/actuator/apis
HTTP/1.1 200 OK
XC-Mock-ServiceId: 203883811233071109
XC-Mock-RequestId: 363db7c5-00ad-4db9-9543-86e76c38c728
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD
Content-Type: application/json
content-length: 257294
{
"203883811233071109:POST:/user/signin" : {
"id" : "204188910677393437",
"name" : "User Login Service",
"method" : "POST",
"endpoint" : "/user/signin",
"responses" : [ {
"name" : "Returns success when correct credentials are entered",
"match" : {
"parameters" : [ {
"name" : "Content-Type",
"in" : "header",
"condition" : {
"value" : "EQUAL",
"message" : "xcm.enum.FullMatchCondition.EQUAL"
},
"expected" : "application/json"
} ],
"body" : {
"condition" : {
"value" : "EQUAL",
"message" : "xcm.enum.FullMatchCondition.EQUAL"
},
"expected" : "{\n \"username\":\"admin\",\n \"password\":\"admin\"\n}"
},
"priority" : 1000
},
"content" : {
"status" : 200,
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"content" : "{\n \"code\": \"S\",\n \"msg\": \"Success\",\n \"data\": {\n \"access_token\": \"181622ea2a1f4934ad6bec0308390da9\",\n \"expires_in\": \"3599\",\n \"token_type\": \"bearer\"\n }\n}",
"delay" : {
"mode" : {
"value" : "NONE",
"message" : "xcm.enum.ResponseDelayMode.NONE"
}
}
}
}
...
Typical Use Cases
1. Performance Stress Testing Support
- Simulate high-concurrency API responses
- Test system's maximum load capacity
- Avoid impacting real services during stress tests
2. Exception Scenario Construction
- Custom error status codes (4xx/5xx)
- Simulate network delays (millisecond-level control)
- Trigger specific business exceptions
3. Development-Testing Decoupling
- Frontend development independent of backend completion
- Enables parallel development and testing
- Service version compatibility verification
4. Third-party Service Simulation
- Payment gateway simulation
- SMS verification service
- Social media API integration