apiaryio / dredd

Language-agnostic HTTP API Testing Tool
https://dredd.org
MIT License
4.18k stars 279 forks source link

Dredd reporter should show actual/expected attributes in same order #1105

Open kylef opened 6 years ago

kylef commented 6 years ago

Dredd shows the output like the following during a failure:

expected:
headers:
body:
statusCode: 200

actual:
statusCode: 200
headers:
body:

IMO, the order of statusCode should be the same, and it should be at the top of the expected output:

  expected:
+ statusCode: 200
  headers:
  body:
- statusCode: 200
honzajavorek commented 5 years ago

@artem-zakharchenko I just stumbled upon this while triaging older issues. Weren't we addressing something like this recently? 🤔

kylef commented 5 years ago

I've re-rested I can confirm the behaviour I reported is still the case:

$ dredd --version
dredd v11.2.4 (Darwin 18.5.0; x64)
artem-zakharchenko commented 5 years ago

@honzajavorek We were addressing an explicit order of Gavel's validation result fields in the Dredd's logging. That's just to decouple Dredd's output and Gavel's output. It's possible there is something else influencing this behavior.

Btw, the decoupling helps to confirm this is a Dredd's issue ;)

We should start from writing a test for this issue.

honzajavorek commented 5 years ago

All right. Let's get back to this later when we're working on the CLI reporter again.