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

Report unexpected requests properly #5

Closed
luisobo opened this issue Sep 5, 2012 · 1 comment
Closed

Report unexpected requests properly #5

luisobo opened this issue Sep 5, 2012 · 1 comment

Comments

@luisobo
Copy link
Owner

luisobo commented Sep 5, 2012

If some request is made but it wasn't stubbed, Nocilla won't let that request hit the real world. In that case your test should fail.
At this moment Nocilla will return a response with a 500, the header X-Nocilla: Unexpected Request and a body with a meaningful message about the error and how to solve it, including a snippet of code on how to stub the unexpected request.

Raising an exception wasn't working well with Kiwi, it didn't report failure.

The correct way of doing this is to integrate with test runners to make the current spec fail.

@luisobo luisobo closed this as completed Apr 25, 2013
@netbe
Copy link
Contributor

netbe commented Jul 4, 2013

@luisobo is it possible to change that behavior? For example let the request execute.

That would be great to let it execute, record the response of real server, and output the all thing to an output.txt. That way you can reuse that output to stub. I have often this case when I work with a development or real test server which is a bit unstable and then you're stuck for hours until it's up again.

Is it something that is easily doable?

EDIT: just found issue #2 which is related to my comment

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

2 participants