-
-
Notifications
You must be signed in to change notification settings - Fork 616
dx: add short_summary formatter option #1664
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
dx: add short_summary formatter option #1664
Conversation
| $scenarioStats = $statistics->getSkippedScenarios(); | ||
| $this->listPrinter->printScenariosList($printer, 'skipped_scenarios_title', TestResult::SKIPPED, $scenarioStats); | ||
| $shortSummary = $formatter->getParameter('short_summary'); | ||
| if ($shortSummary) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In both printers we print the list of scenarios or the list of steps depending on the new option
| $value = ShowOutputOption::from($value); | ||
| $name = ShowOutputOption::PARAMETER_NAME; | ||
| } | ||
| if ($name === self::SHORT_SUMMARY_SETTING) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the option is short_summary but the name of the parameter is shortSummary so we need to convert it
| ], | ||
| ], $profile->toArray()); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is not needed any longer because now we accept the InSummary option for the pretty formatter
| bool $shortSummary = true, | ||
| ...$baseOptions, | ||
| ) { | ||
| if ($showOutput === ShowOutputOption::InSummary) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pretty formatter can now show step output in its summary if the short summary option is set to false, so now this option is valid for this formatter and we can remove this check
acoulton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super helpful, thanks @carlos-granados - one tiny comment on the feature file.
a078962 to
d572cc2
Compare
d572cc2 to
8e40bfd
Compare
|
Thanks @acoulton I will soon add documentation for this and also for the remove prefixes option that was merged recently |
When printing the summary of the run with any failed steps/scenarios, the pretty formatter prints a short summary which just lists the failed scenarios while the progress formatter prints a longer summary which lists all failed steps in detail. If you are running a long list of tests with the pretty formatter, you may want to see the longer summary so that you could see the details of the failure without having to scroll up a lot. Conversely, if you are running the progress formatter, in some environments (for example in CI) you may want to just see a smaller summary.
This PR adds a new
short_summaryformatter option which can be used to decide if you want to show the short summary (with just a list of scenarios) or the long summary (with a list of steps). It defaults to true for the pretty formatter and to false for the progress formatter so that by default they keep the current functionality