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

Better failure messages #43

Open
mt3593 opened this issue Feb 28, 2018 · 0 comments
Open

Better failure messages #43

mt3593 opened this issue Feb 28, 2018 · 0 comments

Comments

@mt3593
Copy link
Contributor

mt3593 commented Feb 28, 2018

Hi @whostolebenfrog

This is more of a improvement than a issue, and is currently more of a thought and an action so would really appreciate your view on this.

So we've had issues understanding why rest-cljer fails, the logs are hard for a new person using the library to understand. It usually takes a week or so going over the output with people to educate how to read and interpret the issues they see.

My current way of teaching people to read the output is find the ClientDriverFailedExpectationException: 1 unexpected request(s): message to get the request and then find the 1 expectation(s): expected: 1, actual: 0 -> ClientDriverRequest: line to read the response. I'm glossing over some more detail here but i'm hoping some of this rings true for you?

Few thoughts on how we could make it more readable:

  • Extract out the logic for the comparison and on failure just output the request/s that failed and the unmatched expected requests.
  • Maybe incorporate why it fails each expected request rather than logging all the failures.
  • Add the expected request clojure representation to the output of the failure, rather than the toString of the function being output.

I've tried having a look at how to do these but I think the limitation is wrapping around the rest-client-driver and using the hamcrest matcher library. So maybe moving away from wrapping this library is the way forward but that kind of defeats the purpose of what this library is for.

Thoughts?

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

No branches or pull requests

1 participant