Skip to content
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

Allow scenario state to be scoped to arbitrary request attributes #2684

Open
tomakehurst opened this issue Apr 16, 2024 · 0 comments
Open

Allow scenario state to be scoped to arbitrary request attributes #2684

tomakehurst opened this issue Apr 16, 2024 · 0 comments

Comments

@tomakehurst
Copy link
Member

Proposal

Currently scenario state applies globally to the mock API, meaning that one user/thread can affect outcomes for another.

To avoid this we should add a context attribute to the scenario that can be expressed as one or more request attributes (via templating would probably make most sense). This way e.g. a session cookie or JWT header value could be used to segregate user sessions.

This context value could be a single templated string. However, it may make sense for it to be possible to supply a list of templated strings so that context elements can be separated (rather than each user coming up with their own string building strategy). TBD.

References

No response

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

No branches or pull requests

1 participant