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

Finer-graded control of responses #149

Open
julianharty opened this issue Dec 20, 2020 · 2 comments
Open

Finer-graded control of responses #149

julianharty opened this issue Dec 20, 2020 · 2 comments
Assignees
Labels
enhancement Improvement to an existing feature

Comments

@julianharty
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I would like to be able to implement fine-graded control of responses e.g. to response first with response A then next time with response B, or to assign weightings e.g. respond 70% of the time with the OK response (think HTTP 200 response), 10% with a server-error response (think HTTP 5xx responses), and 20% with a your request failed response (think HTTP 4xx responses).

These would enable me to automate and test using richer conversations.

Describe the solution you'd like
A mechanism where I could:

  • pre-specify the 'rules' that qontract (or a delegated utility) would return;
  • control the responses on-the-fly where I can do so without needing to shutdown or restart the qontract server.

Describe alternatives you've considered
hmmmm. Looking for another tool? To be honest, I've not really considered many alternatives, I can envisage this being a great enhancement if it's practical to implement.

Additional context
I mentioned a wishful idea of using a plugin architecture in #148 perhaps this is another example of where plugins might work well?

@julianharty
Copy link
Contributor Author

BTW: I'd like similar abilities to do things such as delay responses by varying amounts. It would also be useful if the server logs would include the details used (and optionally e.g. if configured to run in verbose mode, to include the rule that was applied to the response).

@joelrosario
Copy link
Member

If I've understood the bit about delayed responses, it's supported.

However, there's nothing in the logs that tells you that a delay was introduced, and by which stub expectation.

@jaydeepk jaydeepk added the enhancement Improvement to an existing feature label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants