Skip to content

Support scope variables in URIs #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timhendriks93
Copy link

These changes allow the usage of scope variables within URIs. This can be helpful to create scenarios in which you would want to request URLs with dynamic segments (e.g. resource IDs). To avoid repetition, I created a new helper function to build Request URLs by concatenating the URI and the base URL while replacing scope variables.

Example scenario flow

  1. A POST request creates a new resource and responds with the new resource ID (e.g. 123)
  2. The resource ID is extracted from the response and saved into a scope variable (e.g. "id")
  3. A GET request to the newly created resource is made (e.g. /resource/##id)
  4. The scenario verifies that the status code equals 200 (not 404)

Copy link

@JoramM JoramM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants