Skip to content
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

add and apply configuration option TraceSuccessfulScenarios #2725

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

delta-emil
Copy link
Contributor

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:

  • Is this approach a good idea at all?
  • Where exactly things should go? Are the changes to the internal interfaces okay? Is that an okay place to keep state, such as the buffer, in 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

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Performance improvement
  • Refactoring (so no functional change)
  • Other (docs, build config, etc)

Checklist:

  • I've added tests for my code. (most of the time mandatory)
  • I have added an entry to the changelog. (mandatory)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant