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

Limited to HTTP text-based requests & responses #23

Closed
atifaziz opened this issue Jun 11, 2019 · 4 comments
Closed

Limited to HTTP text-based requests & responses #23

atifaziz opened this issue Jun 11, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@atifaziz
Copy link
Contributor

The project intro reads as if this is designed for general-purpose HTTP recording and playback:

Records and replays successful HTTP responses in your testing environment.

In a micro-service context, where your integration tests depend on a lot of external HTTP resources, Cassette is an ideal tool to improve the stability of your CI pipeline. It is based on a very simple idea: uniquely identify all the requests that pass through and record succesfull reponses. After recording, replay the same responses without actually calling the real REST endpoint.

To create that unique request identifier, Cassette computes an hash from the HTTP method, the uri and the body.

There is no mention of it being limited to textual HTTP resources, which is somewhat misleading. On close inspection, one see that Request.Body and Response.Body are typed as string. If the scope of the project is API endpoints accepting and returning textual entities then the README should be updated to mention the limitation/scope.

Having said that, I didn't see any reason for the limitation. A quick spike showed that a few tweaks can have the library can working without regard to he content media type. I'd be happy to submit the results as a PR if you'd welcome that.

@lecaillon
Copy link
Owner

Totally right, great idea. Thanks for the feedback. Waiting for your MR ;)

@atifaziz
Copy link
Contributor Author

Waiting for your MR ;)

Done. See PR #24.

@lecaillon
Copy link
Owner

lecaillon commented Jun 11, 2019

By the way, if you think the readme isn't clear enough or can be improved in anyway, feel free to submit a PR too.

@lecaillon lecaillon added this to the Cassette 1.1.0 milestone Jun 11, 2019
@atifaziz
Copy link
Contributor Author

Closed via 5c485c1.

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

No branches or pull requests

2 participants