PFLBAI load testing ← Back to overview
Scripting guide

How to write a good scenario

PFLB's AI turns a plain-English description into a load-testing script. The quality of the script depends on the quality of your instructions — and it works best with detailed functional test cases, which already spell out every step.

Rule of thumb: write each step the way you'd hand it to a new teammate who has never seen your app. If a person could follow it without guessing, so can the AI.
1

The more detail you give, the better the script

Vague instructions force the AI to guess. Spell out which path you mean — especially when your app has more than one of something.

✗ Vague
"Log in to the website."
✓ Specific
"Log in as a renter" — when the site has both renter and landlord sign-ins.
2

Avoid unclear abbreviations

Spell things out. Abbreviations and internal shorthand can be read the wrong way or matched to the wrong field.

✗ Ambiguous
"Book a flight to SF."
✓ Clear
"Book a flight to San Francisco."
3

One action per step

Break the journey into single, ordered actions. It keeps the generated steps clean and easy to edit.

✗ Crammed
"Search and buy headphones."
✓ Ordered
"Search for 'wireless headphones'. Open the first result. Add it to the cart. Go to checkout."
4

Name the exact element

Refer to buttons, links, and fields by the label the user actually sees on screen.

✗ Generic
"Submit the form."
✓ Named
"Click the 'Place order' button."
5

Include the test data to use

If a step needs input, give it. The AI will parameterize it into the script instead of inventing values.

✗ Missing
"Filter the results and pay."
✓ With data
"Filter price under $50. Pay with the card ending 4242."
6

State what should happen

Tell it the expected result of a step so the script can verify the flow actually worked under load — not just that requests fired.

✗ No outcome
"Place the order."
✓ With outcome
"Place the order and confirm an order number appears."

Ready to try it?

Paste a scenario into the free scripting tool, or book a demo and we'll run your first real test case together.