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

ITestOutputHelper "accessor" #7

Closed
martincostello opened this issue Aug 20, 2018 · 0 comments · Fixed by #8
Closed

ITestOutputHelper "accessor" #7

martincostello opened this issue Aug 20, 2018 · 0 comments · Fixed by #8
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@martincostello
Copy link
Owner

For "long running" test fixtures (e.g. a in-process HTTP server for a test collection) it is not possible to hook-up ITestOutputHelper as that's a per-test dependency.

This could be "solved" by doing something like HttpContextAccessor and registering a service with DI that can be used to "reach-in" to the test server from tests and set the ITestOutputHelper to use for a given test lifetime and then remove it again.

@martincostello martincostello added the enhancement New feature or request label Aug 20, 2018
@martincostello martincostello added this to the v0.1.0 milestone Aug 20, 2018
@martincostello martincostello self-assigned this Aug 20, 2018
martincostello added a commit that referenced this issue Aug 20, 2018
Initial infrastructure to get ITestOutputHelper from an accessor (like IHttpContextAccessor) so long-lived test fixtures can register the provider without immediate access to an ITestOutputHelper.
Relates to #7.
martincostello added a commit that referenced this issue Aug 20, 2018
Update the examples in the README to reference the changes from #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant