SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

add and apply configuration option TraceSuccessfulScenarios #2725

Open delta-emil opened 10 months ago

delta-emil commented 10 months ago

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:

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: