add and apply configuration option TraceSuccessfulScenarios #2725
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An attempt to address #2708
The matter I'm trying to address is how to completely suppress the trace output of succeeding scenarios, while at the same time preserving it for failing ones.
The idea is to have a new configuration option, which causes trace messages to be buffered until an error happens. If an error happens, all buffered messages are flushed, and following messages go through without buffering until the start of the next scenario. If the scenario finishes with status OK, the buffered messages are discarded.
I'm posting this as a starting point for discussion, rather than anything like a for-sure final draft, because I think I need the maintainers' opinions on:
AsyncTraceListener
? Would this even work correctly with parallel executions? I'm probably not putting some things in the right place.I'll try to add an integration test later to more explicitly show the expected behaviour.
I'll hold off on unit tests until it more clear where the implementation will go.
Types of changes
Checklist: