coreclr.xunit
coreclr.xunit copied to clipboard
Read xunit runner configuration properly
This addresses https://github.com/dotnet/cli/issues/2184.
I'm not sure how to properly test this locally as when I try to build the test project as-is, I get package restore errors. It's looking for 99.99.99-rc2 as a package. If I change to project ref, I get errors:
dotnet-test Error: 0 : Microsoft.DotNet.Cli.Utils.CommandUnknownException: No executable found matching command "dotnet-test-xunit"
at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.FindProjectDependencyCommands(String commandName, IEnumerable`1 commandArgs, String configuration, NuGetFramework framework, String outputPath, String buildBasePath, String projectDirectory)
at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration)
at Microsoft.DotNet.Tools.Test.ConsoleTestRunner.DoRunTests(ProjectContext projectContext, DotnetTestParams dotnetTestParams)
at Microsoft.DotNet.Tools.Test.BaseDotnetTestRunner.RunTests(ProjectContext projectContext, DotnetTestParams dotnetTestParams)
at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)
So...this should work but I need help to execute unit tests on it to confirm.
For eff1383, see https://github.com/xunit/visualstudio.xunit/blob/master/xunit.runner.visualstudio.testadapter/Visitors/VsDiscoveryVisitor.cs#L63 for how the existing VS Adapter displays test case names
ping @piotrpMSFT @pakrym. I'd really like to get this into the bits that are ready for RC2 users.
Hey Oren, thanks for the PR! Once we're done with the remaining CLI PR I'm going to need to take a few changes to the test runner, including updating dependencies. I'll ask for permission to merge this one at the same time.
Thanks, Piotr
From: Oren Novotny [email protected] Sent: Thursday, May 5, 2016 5:09:12 AM To: dotnet/coreclr.xunit Cc: Peter Puszkiewicz; Mention Subject: Re: [dotnet/coreclr.xunit] Read xunit runner configuration properly (#32)
ping @piotrpMSFThttps://github.com/piotrpMSFT @pakrymhttps://github.com/pakrym. I'd really like to get this into the bits that are ready for RC2 users.
You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/dotnet/coreclr.xunit/pull/32#issuecomment-217137543
One question though -- how do I test this? I wasn't able to figure out how to execute this code in a debugger?
@onovotny What we do to test this is, when you do a build.ps1, we publish the local build of the runner to your packages folder, with a version number passed on the day and time. If you want to run your tests, you can manually update the test project to point to the xunit runner version that you just published and then you should be able to dotnet test the test project.
Remember to not commit your test project.json change with the version change.