User Flow Script
Simulate realistic user journeys with sequential iteration flows.
Example: Login → Auth → Browse → Logout
This example demonstrates a complete user flow with sequential iterations that simulate a real user session:
name: user-flow-test
rounds:
- name: simulate-user-flow
numberOfClients: 100
arrivalDelay: 3000 # Start a new client every 3 seconds
runInParallel: false # Ensures iterations run sequentially
iterations:
- name: login-page
mode: R
requestCount: 1
httpRequest:
httpMethod: GET
url: https://example.com/login
- name: authenticate
startupDelay: 1
mode: R
requestCount: 1
httpRequest:
httpMethod: POST
url: https://example.com/auth
payload:
raw: |
{
"username": "testuser",
"password": "password123"
}
headers:
Content-Type: application/json
- name: get-dashboard
startupDelay: 1
mode: R
requestCount: 1
httpRequest:
httpMethod: GET
url: https://example.com/dashboard
- name: logout
startupDelay: 1
mode: R
requestCount: 1
httpRequest:
httpMethod: GET
url: https://example.com/logout
Key Configuration Points
- runInParallel: false - Ensures each step runs after the previous one completes
- startupDelay - Adds realistic delays between user actions
- arrivalDelay: 3000 - New clients start every 3 seconds, simulating gradual user arrival
Run Command
lps run flow.yaml