coreclr.xunit icon indicating copy to clipboard operation
coreclr.xunit copied to clipboard

Read xunit runner configuration properly

Open clairernovotny opened this issue 8 years ago • 5 comments

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.

clairernovotny avatar May 01 '16 00:05 clairernovotny

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

clairernovotny avatar May 01 '16 00:05 clairernovotny

ping @piotrpMSFT @pakrym. I'd really like to get this into the bits that are ready for RC2 users.

clairernovotny avatar May 05 '16 12:05 clairernovotny

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

TheRealPiotrP avatar May 05 '16 18:05 TheRealPiotrP

One question though -- how do I test this? I wasn't able to figure out how to execute this code in a debugger?

clairernovotny avatar May 05 '16 18:05 clairernovotny

@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.

livarcocc avatar May 09 '16 03:05 livarcocc