Test Objectives
- Verify system stability and responsiveness under high concurrent access
- Verify system resource utilization (CPU, memory, I/O, network)
- Verify system capacity under target TPS/QPS
- Verify response time and success rate of key business processes under peak load
Test Environment Description
Resource Introduction
- 4 application servers with 8C16G
- 2 load generation servers with 4C8G
Note:
- During load testing, enable 4 instances of access-api and data-center
Load Test Scenario Design
Single Transaction Load Scenario
Single API load testing, statistics on performance peak; report only records highest performance values
| No. | Request API | Concurrency | Test Duration (seconds) |
|---|---|---|---|
| 1 | Get SDK configuration API | 200 | 60 |
| 2 | Get base library info API | 200 | 60 |
| 3 | Get mini-program details API | 200 | 60 |
| 4 | Get privacy info API | 200 | 60 |
| 5 | User reporting permission API | 200 | 60 |
| 6 | Data reporting API | 200 | 60 |
Mixed Test Scenario
Mixed API load testing, statistics on performance peak; report only records highest performance values
| No. | Request API | Concurrency | Test Duration (seconds) |
|---|---|---|---|
| 1 | Get SDK configuration API | 30 | 60 |
| 2 | Get base library info API | 60 | 60 |
| 3 | Get mini-program details API | 60 | 60 |
| 4 | Get privacy info API | 30 | 60 |
| 5 | User reporting permission API | 10 | 60 |
| 6 | Data reporting API | 10 | 60 |
Stability Test Scenario
For business APIs with concurrent scenarios, perform 5-60% of peak performance long-term load testing for 8 hours, observing whether the system errors and resource consumption
| No. | Request API | Concurrency | Test Duration (seconds) |
|---|---|---|---|
| 1 | Get SDK configuration API | 10 | 28800 |
| 2 | Get base library info API | 10 | 28800 |
| 3 | Get mini-program details API | 10 | 28800 |
| 4 | Get privacy info API | 10 | 28800 |
| 5 | User reporting permission API | 10 | 28800 |
| 6 | Data reporting API | 10 | 28800 |
Load Testing Tools
Self-Developed Load Testing Tool
Tool Introduction:
A self-developed load testing tool based on Go language and Domain-Driven Design (DDD) principles. This tool originates from actual business development needs, integrating DDD architecture, CQRS pattern, and event sourcing mechanism. It naturally aligns with business logic and can achieve highly controllable, extensible, and high-performance load testing capabilities.
Load Testing Introduction:
Start using docker, pass in relevant environment variable parameters for load testing
JMeter
Tool Introduction:
An open-source performance testing tool mainly used for stress testing, load testing, and performance analysis of web applications, APIs, databases, etc.
Load Testing Introduction:
Provides JMeter load testing tpl API files. Modify corresponding parameters as needed and implement load testing according to different customer environments
