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
Add support for configuring mock/proxy behavior via the CLI #1024
Comments
@255kb The mockoon docs say that the CLI is supposed to support proxy mode, but I can't find documentation on how to enable it, and nothing in the repo makes it clear how to use proxy mode. Can you please shed some light on the timeline for adding this feature? |
@aaron-junot The CLI is not a standalone app. It is designed to run Mockoon data files created using the desktop app. All the features you can activate in the desktop app are supported by the CLI, this is the case for the proxy. |
@255kb I looked at the docs again, I was using the wrong verbiage. I don't think this issue is actually relevant to what I wanted to do. I wanted to be able to record requests via the CLI. For reference, the use case is that we have mocks, but the third party API that we're mocking has a breaking change and now our mocks must be re-recorded. We want to be able to re-record these in CI and then open a PR with the change to our JSON mocks repo. Should I open a separate GitHub issue to discuss this? |
@aaron-junot yes, I would say it's unrelated to this issue. Enabling disabling recording mode programmaticaly through a CLI flag or through the admin API requires more work and of different kind. Currently, the recording is a feature from the desktop app only. |
It would be great if it were possible to use a single mock server definition/specification (i.e. JSON file) for various different development patterns.
For example:
This means that a simple app config can handle "run as in production", "run in isolation" (failing on undefined tests) and partial mocking (allow for easy addition of missing mocks).
This allows a developer to easily replicate the behaviour of an app in production, run a test suite or develop a new integration/e2e test without ever needing to change the hostname of the server endpoint.
This ability to control its proxy behavior at runtime adds a significant amount of value to using Mockoon as an easy-to-use mock/proxy server for rapid application and test development.
The text was updated successfully, but these errors were encountered: