-
Notifications
You must be signed in to change notification settings - Fork 280
Machine-readable reporter #341
Comments
Good idea I think. Might improve the integration possibilities. +1 |
+1 |
I think this should be implemented using the TAP protocol: https://testanything.org/ |
Let's do this. The idea is:
Open questionsFollowing needs to be answered before we do this:
Resources |
@garyluu @juliengerboud @mlambley I noticed you are using the HTML reporter. What is your use case for it? Why do you prefer it? |
Thinking about this further:
So the remaining issue is how to support multiple reporters. I've seen quite a few people here to use Dredd with dot reporter together with apiary or html reporters, as in
TAP steals stdout, so that wouldn't be possible. And the stderr would be probably ocuppied by redirected server and hooks output... 🤔 |
didn't end up using the html reporter, but i was trying to create a web link that quickly displayed the results |
Regarding the |
@honzajavorek The idea was to "store" the report as an artifact of TeamCity build. This way, users checking a build creating the report would just had to click on the file and the report would have been display directly into the browser. |
With @michalholasek we designed following steps to take:
Regarding the server/hooks output, we can capture it as suggested in #593 (comment) and put it into special TAP comments as part of the stdout. The stderr would be reserved for output of the |
@garyluu @juliengerboud Thanks for sharing! Did you need the CLI output as well or was the HTML file sufficient for you? I mean, if you run Dredd like you described, did you care about what it outputs to the console at all? |
The last time I tried, I needed the CLI output as well (in order to get the summary): |
@honzajavorek The CLI log is quite useful! It is easier to read IMHO. |
It's been... quite a while, but I'll try to remember my use case. I wanted the cli to give brief information (a single line for each test, showing perhaps method, url, result). The problem I had was that the cli reporter was cluttered with json dumps of failed tests. There were two options for the cli reporter: show errors inline or show errors at the end. I wanted the option to not show errors at all. The dot reporter wasn't ideal either because you couldn't see the test information (and if memory serves, it still dumped json data anyway). A HTML file is a much easier place to review long strings of json and identify where the errors are. I wanted the cli reporter to give summary info, with detailed information in the html. I don't know how TAP will fit into this, but my suggestion was to have an interface for creating custom reporters and be able to configure dredd to say "read extra reporters from this directory". I think another suggestion I had was to create a "quiet cli reporter" which was a copy of cli reporter with all of the "show errors" code removed. |
…6.3.0 chore(deps-dev): update eslint requirement from 6.2.2 to 6.3.0
...or a different easily machine-readable format. Would significantly simplify writing some integration tests (such as those in #338). Filing this issue so people can add other use cases - probably not worth implementing just because of couple of tests.
The text was updated successfully, but these errors were encountered: