-
Notifications
You must be signed in to change notification settings - Fork 280
Redesign CLI reporter #765
Comments
This looks good. What I'm currently sorely missing is a summarized way to see passed/failed requests. Something like:
Or perhaps this? This is even better because this way you can distinct the two examples for the same METHOD call on an endpoint.
With failures showing at the end as you proposed above? |
@driesvints So the
output would still be way too verbose for you? |
That actually looks a lot better than the current implementation. But I think an extra level which reduces it to a single line could also have its purpose (in CI outputs etc). It's definitely not something which needs to happen for the first release, perhaps we can work on this later and continue with the above proposal now? |
Or even a dot level so you get something like this:
This is especially handy in CLI reports. |
@driesvints There already is a dot reporter: |
ah yeah but you can't use that in combination with sending reports to apiary right? |
You should be, Dredd supports multiple reporters. |
Hi there! Regarding exit codes, I've noticed that dredd returns 0 even when tests are errored (e.g. when the server didn't start). Is that intentional? Thank you! |
@clementgarnier That is definitely not intentional. Could you please file a separate issue for that? This would be a serious error and should be fixed right away. |
I found some old notes we should eventually take into account:
|
Note: We should not forget about separating (or not) hook handlers output as well - #910 (comment) |
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
A part of the effort to separate application logging from the reporters output. Addresses #1089, supersedes #1099, enables #765 BREAKING CHANGE: Instead of --level use --loglevel. The option is no longer able to affect reporter output, it only affects application logging output. Use --loglevel=silent instead of --silent, which is now removed. The --loglevel option now only accepts 'silent', 'error', 'warning', 'debug' as values.
Dredd's CLI reporter, which is what most users see as its default output, has several flaws. You can list some of them using the CLI reporter label. The aim of this meta-issue is to design a new reporter.
Requirements / Internal Redesign
--names
option, and other parts of Dredd.CLI Reporter Redesign
Progress
Print short progress information first, use ✔ or number in case of a failure. Make the progress information very brief. Something like:
If possible (terminal support,
--color
/--no-color
), use colors (green, red) to denote pass or failure. The requested URL displayed in the output is the real one, with templates filled, with all changes applied, not the one from API description (#405). Every test starts with a transaction name (#430).List of Failures
List failures at the end, reference by failure numbers. Each failure in the list of failures contains:
:line-number
at the end (clickable on some terminals, can be opened in an editor)curl
command would perform exactly the same HTTP request as Dredd did during testing.Idea from @kylef: Another section could be a snippet of the source API description with the expectation which failed.
Summary
Lists passed, failed, errorred, skipped tests. If any of these categories is zero, it's not listed.
The
# total
part is always listed (so if Dredd finds 0 tests, it's going to be:Fixes
NaN
in benchmarks of the HTTP transaction (Sometimes CLI reporter outputs 'NaNms' #376)Documentation
Related New Features / Follow-Ups
--server
is used, capture the server output. Silence it by default. If tests fail, print it separately (see pytest). Allow to force certain behavior by CLI options. Resolves Dredd redirects server output #593.The text was updated successfully, but these errors were encountered: