Skip to content

Commit

Permalink
Extend documentation to better explain usage of with_items_range, shu…
Browse files Browse the repository at this point in the history
…ffle, pick
  • Loading branch information
Daniel Haarhoff authored and fcsonline committed Aug 21, 2023
1 parent 4dd9fd5 commit da4bd88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ plan:
- 75
shuffle: true
pick: 1

- name: Three requests with random items from a range
request:
url: /api/users/{{ item }}
with_items_range:
start: 1
stop: 1000
shuffle: true
pick: 3
```
As you can see, you can play with interpolations in different ways. This
Expand Down
4 changes: 3 additions & 1 deletion SYNTAX.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ All those three items can be combined with `name` property to be show in logs.
- `method`: HTTP method in the requests. Valid methods are GET, POST, PUT, PATCH, HEAD or DELETE. (default: GET)
- `body`: Request body for methods like POST, PUT or PATCH.
- `with_items`: List of items to be interpolated in the given request url.
- `with_items_range`: Generates items from an iterator from start, step, stop.
- `with_items_range`: Generates items from an iterator from start, step (optional, default: 1), stop.
- `with_items_from_csv`: Read the given CSV values and go through all of them as items.
- `shuffle`: Shuffle given items randomly (default: false).
- `pick`: Number of items to pick and perform requests with.
- `assign`: Save the response in the context to be interpolated later.
- `tags`: List of tags for that item.

Expand Down

0 comments on commit da4bd88

Please sign in to comment.