Performance Testing Service (PTS) lets you test Dubbo microservices deployed in a virtual private cloud (VPC) directly from the PTS console, without deploying JMeter or other tools inside the VPC.
Prerequisites
Before you begin, ensure that you have:
Dubbo microservices that can be invoked in a generic manner
Create a test scenario
Log on to the PTS console, choose Performance Test > Create Scenario, and then click Dubbo.
On the Microservice Scenario page, specify the scenario name, select the source of the tested applications, the region, and the microservices namespace.
On the Scenario Settings tab, click + Add Dubbo3 Node to add a test node to the business session.
Click the expand icon on the right side of the business session to configure the basic settings, function parameters, output parameters, and checkpoints.
Basic settings
| Parameter | Description | Example |
|---|---|---|
| Application Name | The name of the application. | testapp |
| API | The API used to access the microservices. | com.alibaba.pts.dubbo.api.DemoService |
| Registry Type | The type of service registry. Valid values: ZooKeeper, Nacos, Redis, and Direct-connect. | Nacos |
| Registry Address | The address of the microservice registry in [ip]:[port] or [domain name]:[port] format. Separate multiple registries with commas. Example: [ip1]:[port1],[ip2]:[port2]. | 192.168.0.0:8080 |
| Group | The group of the Dubbo microservices. | testgroup |
| Version | The version of the Dubbo microservices. Default: 1.0. | 1.0 |
| Method Name | The method name for accessing the Dubbo microservices. | sayHello |
| Connection Timeout | The timeout period for establishing a connection with the Dubbo microservices. | 5000 |
| Response Timeout | The timeout period for receiving a response from the Dubbo microservices. | 20000 |
For Microservices Engine (MSE) users, the registry address format depends on whether a namespace is configured:
No namespace configured: The default namespace DEFAULT_GROUP is used. Enter the registry address directly. Example:
XXX.nacos-ans.mse.aliyuncs.com:8848.Namespace configured: Append the namespace to the registry address. Example:
XXX.nacos-ans.mse.aliyuncs.com:8848?namespace=TEST.
Function parameters
| Parameter | Description | Example |
|---|---|---|
| Common parameters | The common parameters in the Dubbo microservices functions involved in the performance test. | Parameter name: java.lang.String, Parameter value: ${date} |
| Implicit parameters | The implicit parameters in the Dubbo microservices functions involved in the performance test. | Parameter name: setAttachment, Parameter value: ("index","1") |
Output parameters
On the Output Parameter Definition tab of a session, configure output parameters. For more information, see Output parameters.
Checkpoints
On the Check Point (Assertion) tab of a session, configure checkpoints. For more information, see Check point (assertion).
Configure stress testing parameters
| Parameter | Description |
|---|---|
| Source of Stress | Internet: Stress testing nodes are located around the world. Node resources (IP addresses) are allocated based on the scale of the test. Alibaba Cloud virtual private clouds (VPCs): The test runs over the VPC. Stress testers and the tested servers are located in the same region. For more information, see Stress testing in Alibaba Cloud VPCs. |
| Stress Mode | Virtual user mode: Measures how many concurrent online users each node in the business system can handle from the client perspective. Configure the target number of virtual users. Requests per second (RPS) mode: Measures system throughput from the server perspective. Specify an RPS value directly, without converting from virtual users. |
| Auto Incremental Mode | Manual Adjustment: The number of virtual users stays fixed. The stress prediction chart shows a flat line. Tiered Increment: The number of virtual users increases in steps. Virtual users increase by a set amount at each interval until the target number is reached, then remain steady. The stress prediction chart shows a step pattern. |
| Max VUs | The maximum number of virtual users for the whole scenario in virtual user mode. |
| Increment Percentage | In tiered increment mode, you must specify the increment percentage. |
| Single Load Level Duration | Required in tiered increment mode. Set to at least 1 minute to allow enough time to identify issues at each load level. |
| Total Test Duration | In tiered increment mode, the duration must be greater than or equal to: Single Load Level Duration / Incremental magnitude x 1.1 (rounded up). The maximum duration is 24 hours. |
| Number of Specified IP Addresses | The number of IP addresses that apply stress. For more information, see Specify the number of IP addresses applying stress. |
| Region-specific Traffic | Turn on this switch to simulate local user traffic. After you turn it on, configure the region distribution of stress testers. For more information, see Custom traffic. |
Start the performance test
Click Save and Start. On the Note page, select Execute Now and The test is permitted and complies with the applicable laws and regulations., and then click Start.
To debug a scenario before running the full test, click Debug. For more information, see Debug scenarios.
View test results
After the performance test completes, the system generates a report that includes scenario metrics, business details, monitoring details, and API sampling logs. For more information, see View PTS stress testing reports.
(Optional) Add controllers and timers
Add controllers and timers to customize test node execution behavior.
Controllers
On the Scenario Settings tab, click Add Controller and select a controller type.
Loop controller
Controls how many times a test node runs in a loop. Select a loop controller, click the more icon next to it, select the node to loop, and specify the number of loops. During the test, the specified node runs sequentially for the specified number of times.
Transaction controller
Groups all test nodes within it as a single transaction. Two switches are available:
Generate parent sample:
Turned on: Individual node results within the transaction controller are not recorded separately. Instead, they are aggregated as the results of the transaction controller.
Turned off: Both the transaction controller results and the individual test node results are displayed in the report.
Include duration of timer and pre-post processors in the sample:
Turned on: The average response time of the transaction controller is the sum of the average response times of all test nodes, timers, and pre-processors and post-processors.
Turned off: The average response time of the transaction controller is the sum of the average response times of all test nodes only.
Only once controller
Nodes added to this controller run only once.
Timers
On the Scenario Settings tab, click Add Timer and select a timer type.
Constant timer
Specifies a fixed pause duration during the performance test. Unit: milliseconds.
Synchronous timer
Specifies values for Timeout and Number of Simulated Users. The performance test is triggered after the specified number of users is reached within the timeout period. If the specified number of users is not reached within the timeout, the test is triggered without further waiting.
Unified random timer
Specifies a random pause duration. Configure Constant Delay Offset and Random Delay. The total pause duration equals the fixed pause time (Constant Delay Offset) plus a random value within the range specified by Random Delay. Each random value has equal probability of occurrence.
Gaussian timer
Similar to the unified random timer, but the random pause time follows a normal distribution. Configure Constant Delay Offset and Random Delay.
Fixed throughput timer
Controls test node execution based on a target throughput. Configure a throughput condition from the following options:
Only the current thread
All active threads
Active threads in the current link
Globally active thread
Globally active threads in the current link