Skip to content

Commit

Permalink
Add example parametrizing query params
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Nov 18, 2023
1 parent 250be80 commit 722b40b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/test_parametrize.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ stages:
status_code: 200
json: !force_format_include "{tavern.request_vars.json}"

---
test_name: Test parametrizing query parameters

marks:
- parametrize:
key: query_param
vals:
- example_value

stages:
- name: Echo back parametrized value from query parameter
request:
url: "{global_host}/echo_params"
method: GET
params:
example_param: "{query_param}"
response:
status_code: 200
json:
example_param: example_value

---
test_name: Test parametrizing using 'vals' directly and not in the list, list key

Expand Down

0 comments on commit 722b40b

Please sign in to comment.