-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Extend documentation and samples #157
Comments
I'd be super interested in this. Usually, I set up a collection fixture where the service collection / test server is created once, then all test classes use that same instance to run tests. My understanding is that Am I missing something? |
That's correct, but it's possible to still use it with a shared fixture with the use of the From an example in one of my own projects.
xunit then does the rest of the heavy lifting for you. The only downside (which is inherent to how xunit works) is that you can't have multiple tests running in parallel with the same fixture, as they'll otherwise be fighting over the current output helper. Maybe you could wrap it and have multiple helpers and cycle them based on the current thread/fixture or something and delegate it via a reference to overcome that, but it's not something I've tried. |
Very clean implementation, I like it a lot. I usually have base classes as well to reset the database between each test. Thanks heaps! |
Is there a way to set the log level? Thank you, Martin |
All levels except xunit-logging/src/Logging.XUnit/XUnitLogger.cs Lines 103 to 111 in f01740b
My guess would be your application is configured to not log whatever you're looking for at Debug or Trace. |
Based on #156, the documentation could be expanded (and the samples extended) to show usage of the logger with a test fixture, rather than just in a standalone test.
Also consider an example that supports parallel execution of tests without bleeding the logger between them.
The text was updated successfully, but these errors were encountered: