- [[Flood Element]] [[Load Testing]] [[Workload Modeling]]
- Date Created: [[2020-09-08]]
- "`step.if()` can be used to simulate certain [load distributions]([[Load distribution]])"
- "```javascript
step.if(
() => percentage < 21,
'20%',
async (browser) => {
console.log('Do this action 20% of the time.')
},
)```"
- For example, in the case of an e-commerce site, `step.if()` can be used to simulate: (absolute percentages)
- 100% of users visiting home page
- 80% visiting item page
- 13% adding item to cart
- 10% purchasing