All Products
Search
Document Center

Performance Testing:Stress testing example for e-commerce

Last Updated:Nov 01, 2024

Before you use Performance Testing (PTS) to perform stress testing, we recommend you plan out your business scenarios and orchestrate scenarios that can meet your actual business requirements. In this topic, a typical e-commerce business scenario is used as an example to describe how to orchestrate a stress testing scenario in PTS.

Scenario description

Taobao needs to perform stress testing on pages related to Product A and Product B. In this case, multiple API operations are called. The following business scenarios are used in this example:

  • Business A: Browse information about Product A.

  • Business B: Purchase Product B. This business scenario involves the following steps: Log on to Taobao, browse information about Product B, add Product B to the shopping cart, and submit the order.

The following figure shows the stress testing configurations used in this example.

压测设置示意图.png

  • Session 1: Browse information about Product A and Session 2: Purchase Product B are parallel.

    A number of users are browsing Product A, while some other users are performing operations to purchase Product B. According to the business logic, two separate sessions are created for the business scenarios, and requests for the sessions are initiated in parallel during stress testing.

  • Multiple API operations in a session are called in sequence.

    In Session 2: Purchase Product B, users perform operations in sequence according to the business logic. Therefore, you must add related API operations to the related session. This way, the API operations can be called in sequence during PTS stress testing.

  • During stress testing, the API operation for browsing information about Product A and the API operation for logging on to Taobao initiate traffic requests at the same time.

What to do next

After sessions are created, you can configure stress testing settings. You can specify a stress testing level for the whole scenario and each session. For more information, see Configure the stress testing model and level.