What would be the best way to capture responses from APIs and use it as an input to Karate mock? Is this built into Karate framework? Any documentations or suggestions will be appreciated.
At a high level, here is what I want to build.
Generate Data
- A scheduled job that can execute a set of API endpoints and capture their responses.
- Responses to be saved as json file for each of the endpoints.
- Create an Artifact and publish it to a repo, so that its available across teams.
Consume data as Karate Mock/Test Doubles
- Developer would download the artifact (json files).
- Start the mock server with feature file(s).
- The scenarios in the feature files uses the json file to produce the mock response.
Note: Brand new to karate and currently learning/exploring its offerings and capabilities.
Thanks.