Commit Graph

3 Commits

Author SHA1 Message Date
John Luo c181547864 Migration fixup for Logging.Testing 2020-03-04 22:10:12 -08:00
Ryan Nowak ddde4faf4f Refactor xUnit extensibility
Adds our own hook for before/after logic that's more usable, called
`ITestMethodLifecycle`. This provides access to a context object
including the information about the test and the output helper. This can
be implemented by attributes or by the class itself.

The goal (and result) of this, is that we have a single *test executor*
extensibility point that provides all of the features we need. We should
use this everywhere we need features xUnit doesn't have.

Adding a new extensibility point (`ITestMethodLifecycle`) allows us to
do this without turning all of these features into a giant monolith.

---

Also updated our existing extensibility to use this new hook.

I did as much cleanup as a could to remove duplication from logging and
keep it loosly coupled. I didn't want to tease this apart completely
because the scope of this PR is already pretty large.
\n\nCommit migrated from 1b10284a47
2019-09-23 07:37:33 -07:00
Ryan Nowak aadc979baf Add AssemblyFixture to our test infra
This is a feature that we're using in Templates and Blazor E2E tests to manage selenium.

It's a general purpose kind of thing, so it makes sense to make it more general. This requires using the
`[assembly: TestFramework()]`.
Also fixed a bug here where this feature broke collection fixtures.
\n\nCommit migrated from 208d44a985
2019-09-23 07:37:33 -07:00