{"action":"created","issue":{"url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/246","repository_url":"https://api.github.com/repos/TestStack/TestStack.BDDfy","labels_url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/246/comments","events_url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/246/events","html_url":"https://github.com/TestStack/TestStack.BDDfy/issues/246","id":213400985,"number":246,"title":"Console output is completely garbled with dotnet test and xUnit","user":{"login":"shaynevanasperen","id":1126129,"avatar_url":"https://avatars1.githubusercontent.com/u/1126129?v=3","gravatar_id":"","url":"https://api.github.com/users/shaynevanasperen","html_url":"https://github.com/shaynevanasperen","followers_url":"https://api.github.com/users/shaynevanasperen/followers","following_url":"https://api.github.com/users/shaynevanasperen/following{/other_user}","gists_url":"https://api.github.com/users/shaynevanasperen/gists{/gist_id}","starred_url":"https://api.github.com/users/shaynevanasperen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaynevanasperen/subscriptions","organizations_url":"https://api.github.com/users/shaynevanasperen/orgs","repos_url":"https://api.github.com/users/shaynevanasperen/repos","events_url":"https://api.github.com/users/shaynevanasperen/events{/privacy}","received_events_url":"https://api.github.com/users/shaynevanasperen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-10T17:20:39Z","updated_at":"2017-03-11T01:20:49Z","closed_at":null,"body":"When running `dotnet test` on a .NET Core Unit test project using xUnit v2.2.0, the console output of each test is interleaved with each other, resulting in a completely useless unintelligible mess, as you can see in the attached screenshot.\r\n![dotnet-test-bddfy](https://cloud.githubusercontent.com/assets/1126129/23805078/67fc1db8-05b4-11e7-94ad-bcbe708274b2.PNG)\r\n\r\nThis probably has something to do with xUnit running tests in parallel, and the need for using `ITestOutputHelper` as described [here](https://xunit.github.io/docs/capturing-output.html), but I've looked at the code and I can't really tell where to make the fix. I think it might be the [ConsoleReporter](https://github.com/TestStack/TestStack.BDDfy/blob/master/src/TestStack.BDDfy/Reporters/ConsoleReporter.cs), which is configured in [Processors](https://github.com/TestStack/TestStack.BDDfy/blob/master/src/TestStack.BDDfy/Configuration/Processors.cs#L38), but there isn't a way to override this to specify that it should use xUnit's `ITestOutputHelper`. I'd be happy to contribute a fix for this, but I'm not sure where to start.\r\n\r\nThis only occurs when using the latest RTM tooling for .NET Core (VS2017). On my other computer which is still running VS2017 RC, I get no console output at all, except for the fully qualified method names of the methods that have the `[Fact]` attribute."},"comment":{"url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/comments/285827930","html_url":"https://github.com/TestStack/TestStack.BDDfy/issues/246#issuecomment-285827930","issue_url":"https://api.github.com/repos/TestStack/TestStack.BDDfy/issues/246","id":285827930,"user":{"login":"robdmoore","id":573791,"avatar_url":"https://avatars0.githubusercontent.com/u/573791?v=3","gravatar_id":"","url":"https://api.github.com/users/robdmoore","html_url":"https://github.com/robdmoore","followers_url":"https://api.github.com/users/robdmoore/followers","following_url":"https://api.github.com/users/robdmoore/following{/other_user}","gists_url":"https://api.github.com/users/robdmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/robdmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robdmoore/subscriptions","organizations_url":"https://api.github.com/users/robdmoore/orgs","repos_url":"https://api.github.com/users/robdmoore/repos","events_url":"https://api.github.com/users/robdmoore/events{/privacy}","received_events_url":"https://api.github.com/users/robdmoore/received_events","type":"User","site_admin":false},"created_at":"2017-03-11T01:20:49Z","updated_at":"2017-03-11T01:20:49Z","body":"Yeah, I have a base class that I pass the output helper directly to in each test's ctor. Then I put the test ctor at the bottom of the file so it's less noisy.\n\n--\n\n\n> On 11 Mar 2017, at 7:55 am, Shayne van Asperen <notifications@github.com> wrote:\n> \n> @robdmoore Thanks. I'm busy doing that right now. But I've run into a snag. The way that xUnit works means that each of my test classes needs to declare a constructor that accepts an instance of ITestOutputHelper, and I really don't want to have to add all that noise to my tests. I'm trying to find a way of using the service locator pattern in a base class of mine, or some way of configuring it once at the assembly level so that I don't have to do this in all of my derived test classes:\n> \n> public DerivedTestClass(ITestOutputHelper output) : base(output) { }\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"robdmoore"}}