Open
Description
When I try to find bug in my JSON payload in integration tests using restito
it doesn't support me with clear debug process.
For example output for failed test:
Condition failed with Exception:
verifyHttp(restitoServer) .once(post("/endpoint"), withPostBodyContainingJson(asString(mySpecialBigPayload)))
| | | | | | |
| | | | | | class path resource [payload_big.json]
| | | | | {
| | | | | "id": "51abb572-c22b-11e8-b3f9-699386e0b5fe-54091516",
| | | | | "prop": "value",
| | | | | "id": [
| | | | | "54091516"
| | | | | ],
... ~500 lines of big JSON
| | | | com.xebialabs.restito.semantics.Condition@6d442a82
| | | com.xebialabs.restito.semantics.ConditionWithApplicables@70b57756
| | java.lang.AssertionError: Expected to happen 1 time(s), but happened 0 times instead
| com.xebialabs.restito.server.StubServer@73101e8b
com.xebialabs.restito.builder.verify.VerifyHttp@7361820a
at
...
Caused by:
java.lang.AssertionError: Expected to happen 1 time(s), but happened 0 times instead
at com.xebialabs.restito.builder.verify.VerifyHttp.times(VerifyHttp.java:58)
at com.xebialabs.restito.builder.verify.VerifyHttp.once(VerifyHttp.java:42)
I had wrong values in two JSON properties/fields and I think searching/debugging phase problems too longer than I expected.
Ideal solution it will be suggest what is different or probably wrong
.
It will be possible to add more clear output when test failed ?
Metadata
Metadata
Assignees
Labels
No labels