All Products
Search
Document Center

Performance Testing:Create a stress testing scenario

Last Updated:Feb 28, 2026

Create a stress testing scenario in Performance Testing Service (PTS) to simulate realistic user traffic and measure application performance under load. PTS is built on the Alibaba Cloud end-to-end stress testing platform and supports web applications and mini programs that communicate over HTTP or HTTPS. It is used across industries such as e-commerce, Internet of vehicles (IoV), multimedia, finance and insurance, logistics and express delivery, advertising and marketing, and social networking.

Scenario structure

A stress testing scenario is organized into three levels:

Scenario
├── Business session A  (parallel)     ── runs simultaneously ──>
│   ├── API 1  (serial)
│   ├── API 2
│   └── API 3
│
└── Business session B  (parallel)     ── runs simultaneously ──>
    ├── API 1  (serial)
    └── API 2
LevelDescription
ScenarioThe top-level container. It holds one or more business sessions that run in parallel.
Business sessionAn ordered set of APIs that represents a single user workflow, similar to a transaction. APIs in a session run serially, in the order listed.
APIA single request that defines the target URL and request details for one step in the workflow.

Example: Suppose you stress test an e-commerce site with two parallel business sessions:

Business sessionAPIs (executed in order)
Browse product A1. View homepage
Purchase product B1. Log on to the site → 2. Browse product B → 3. Add product B to the shopping cart → 4. Submit the order

During the test, both sessions run at the same time. Within each session, the APIs execute one after another in sequence.

Prerequisites

Before you begin, make sure you have:

  • An Alibaba Cloud account with PTS activated

  • The target application URL accessible from the internet (or from a VPC if using internal stress testing)

Create a scenario

Step 1: Open the scenario editor

  1. Log on to the PTS console, choose Performance Test > Create Scenario, and then click PTS.

The Scenario Settings tab opens.

Step 2: Add APIs to a business session

  1. On the Scenario Settings tab, click the Add API drop-down list and select an API type. PTS supports two API types:

    • HTTP APIs -- for HTTP and HTTPS requests.

    • JDBC APIs -- for database requests using Java Database Connectivity (JDBC).

  2. Configure the API with the target URL, request method, headers, and body as needed.

  3. Repeat to add more APIs. After you start the stress test, the APIs within a business session execute in sequence.

Note

Clicking Add API without selecting a type adds an HTTP API by default.

Step 3 (optional): Add more business sessions

Click Add Business Session to create additional business sessions. Each session runs in parallel during the stress test, simulating multiple concurrent user workflows.

Step 4 (optional): Add instructions

Add instructions to control stress testing behavior within a business session, such as conditions and loops. For details, see Instructions.

Step 5: Configure load settings

Configure the remaining sections on the Scenario Settings tab:

SectionDescriptionReference
Stress Mode ConfigurationDefine how load is applied (for example, VU Mode or RPS Mode).Configure the load mode and load level
Load Level ConfigurationSet the magnitude of load, such as the maximum number of virtual users (VUs) or target RPS (Requests Per Second).Configure the load mode and load level
Advanced SettingsConfigure additional parameters.Advanced settings
End-to-End MonitoringIntegrate with ARMS and Managed Service for Prometheus to observe metrics and analyze performance bottlenecks during the test.Configure end-to-end monitoring
OthersConfigure miscellaneous settings.--

Step 6: Debug or start the test

Choose one of the following actions at the bottom of the Scenario Settings tab:

  • Debug the scenario -- Click Debug in the lower-left corner to run a low-volume test and verify that your scenario is configured correctly. For details, see Debug a scenario.

  • Start the test -- Click Save and Start in the lower-left corner to save the scenario and immediately begin the stress test.

Example scenarios

Explore these example scenarios to see PTS stress testing in action:

Manage scenarios after creation

After you create a scenario, find it on the Scenarios page by selecting the PTS filter.

Use the Actions column to manage your scenario:

ActionDescription
StartRun the stress test. See Start a stress test.
EditOpen the Edit Scenario page to modify the scenario. PTS provides features such as scenario replication, business session validation and invalidation, and API replication to improve orchestration efficiency. See Manage a scenario.
DuplicateDuplicate the scenario to use as a starting point for a new test. See Copy a scenario.
DeleteRemove the scenario. Stress test reports generated from the scenario remain available after deletion.