Skip to content

v2.2.9

Compare
Choose a tag to compare
@nohwnd nohwnd released this 08 Apr 15:46
· 2627 commits to main since this release
4316d3b

Parallel output

๐Ÿ™‡ Shout out to @SimonCropp, for bringing this functionality to XUnit in his https://github.com/SimonCropp/XunitContext project. And being an inspiration for implementing this.

MSTest 2.2.9 captures all Console output and attaches it to the correct test, even if you are running tests in parallel. This output is captured from your test code as well as from the tested code. And it requires no special setup.

Before

In 2.2.8, test output is scattered among tests, in our example, one unlucky test gets all the output of other tests just mixed together:

image

After

With 2.2.9, each output is correctly attached to the test that produced it:

image
image

Also notice that we are also capturing debug, trace and error. And we are not awaiting the FastChild method, and the output is still assigned correctly. Souce code.

Limitations

Due to the way that class and assembly initialize, and cleanup are invoked, their output will end up in the first test that run (or last for cleanup). This is unfortunately not easily fixable.

See release notes here.