You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在JMeter中实现多用户按顺序访问多个页面?

How to Set Up Sequential Page Visits for 5 Users in JMeter

Got it, let’s break this down step by step—this is a super common use case and really straightforward once you understand how JMeter executes elements.

Step 1: Create a Thread Group for Your 5 Users

First, you need a Thread Group to represent your concurrent users:

  • Right-click on your Test Plan → Add → Threads (Users) → Thread Group
  • In the Thread Group settings:
    • Set Number of Threads (users) to 5 (this defines your 5 unique users)
    • Set Ramp-Up Period to 0 if you want all 5 users to start at the same time, or adjust to a number like 5 if you want them to launch one per second
    • Set Loop Count to 1 if each user only needs to go through the page sequence once; bump this up if you want them to repeat the flow multiple times

Step 2: Add HTTP Requests in Your Exact Sequence

JMeter runs elements top to bottom within a Thread Group, so just add your 4 page requests in the order you need:

  1. Homepage Request:
    • Right-click on the Thread Group → Add → Sampler → HTTP Request
    • Name it Homepage
    • Fill in the Server Name or IP (e.g., yourdomain.com) and Path (e.g., / for the root homepage)
  2. Page1 Request:
    • Repeat the above steps, name it Page1, and set the correct path (e.g., /page1)
  3. Page2 Request:
    • Same process, name it Page2, path like /page2
  4. Page3 Request:
    • Name it Page3, path like /page3

Just make sure these 4 HTTP Requests are ordered from top to bottom as: Homepage → Page1 → Page2 → Page3. Each user will execute them in this exact sequence.

Step 3: (Optional) Add a Listener to Verify Execution

To double-check everything works as intended, add a View Results Tree:

  • Right-click on the Thread Group → Add → Listener → View Results Tree
  • Run your test, and you’ll see each user’s requests listed in order—each of the 5 users will show the 4 requests in the sequence you defined.

Extra Tips for Polish

  • If you want to simulate user wait time between pages (like reading content), add a Fixed Timer between HTTP Requests: Right-click on a request → Add → Timer → Fixed Timer, then set the delay in milliseconds (e.g., 2000 for 2 seconds)
  • If your pages require a logged-in session, add a HTTP Cookie Manager to the Thread Group—this automatically handles session persistence for each individual user
  • If you need to pass data between pages (like a token from Homepage to Page1), use a Regular Expression Extractor or JSON Extractor to capture and reuse values

That’s all there is to it! Run your test, and each of the 5 users will follow the exact page sequence you need.

内容的提问来源于stack exchange,提问作者Akhil Kumar Patnaik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:37:56