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

Support log assertions #56

Open
Silic0nS0ldier opened this issue Nov 25, 2020 · 1 comment
Open

Support log assertions #56

Silic0nS0ldier opened this issue Nov 25, 2020 · 1 comment

Comments

@Silic0nS0ldier
Copy link
Member

While this can be done manually, it is a bit of a PITA. We already require the execution context as an input, we might as well expand the scape as that is a requirement which won't change anytime soon (that is, unless in the future something like https://github.com/SimonCropp/XunitContext is supported).

@Silic0nS0ldier
Copy link
Member Author

Notes

Desired functionality could include;

  • Specific log events appearing in the desired order
  • Various permutations on the above with more forgiving checks or ordering forgiveness
  • No log events
  • Automatic assertion check on test completion (can be surprisingly difficult, so usually its easier to just do an explicit check)

Potential problems include;

  • Logging being non-blocking action (async)
  • Log events having entropy (e.g. ID and timestamps)
  • Keeping checks DRY without risking self-validation (e.g. using implementation logic to generate a value)
  • Dealing with log event noise from components outside the scope of what you are testing

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

No branches or pull requests

1 participant