How to run parametrized tests for an API? #2313
Unanswered
dragondive
asked this question in
Q&A
Replies: 1 comment 2 replies
-
In theory, this is possible, but I'm not sure how bru's nextRequest works. You can refer to it. Add two environment variables:
Pre-script
test script
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As an example, consider the GraphQL countries API. URL:
https://countries.trevorblades.com/
In the Query tab, I have the following:
In the Variables tab, I have the following:
If I'd want to parametrize the
country_code
to run multiple independent tests of the API, how could I do it?I tried writing a test like this:
But it doesn't work:
What other approaches can I try to run the API with various different values?
Beta Was this translation helpful? Give feedback.
All reactions