project.json
file xunit references are;
"xunit": "2.2.0-beta2-build3300",
"xunit.abstractions": "2.0.1-rc2",
"xunit.assert": "2.2.0-beta2-build3300",
"xunit.extensibility.core": "2.2.0-beta2-build3300",
"xunit.extensibility.execution": "2.2.0-beta2-build3300",
"xunit.runner.console": "2.2.0-beta2-build3300",
"xunit.runner.visualstudio": "2.2.0-beta2-build1149",
"xunit.runners": "2.0.0"
When i try to use ReSharper xUnit test runner, i'm encountering;
"Unit Test Runner failed to run tests, Unable to run xUnit tests - File not found:"D:\srcs\GitProjects..etc\bin\My.Tests.dll" Parameter name: assemblyFileName
Sorry for Turkish exception details, i couldn't change yet. Any idea about that? I searched a lot of forums and i couldn't find any useful stuff. Thanks in advance.
Ctrl+U R / Debug Unit Tests. Ctrl+U D on the toolbar. To run all tests in the session, click Run Current Session. Ctrl+U Y on the toolbar or alternatively, choose ReSharper | Unit Tests | Run Current Session from the main menu.
The MSBuild runner in xUnit.net v2 is capable of running unit tests from both xUnit.net v1 and v2. It can run multiple assemblies at the same time, and build file options can be used to configuration the parallelism options used when running the tests.
From the command line, create a folder for your test project, change into it, and then create the project using dotnet new : $ mkdir MyFirstUnitTests $ cd MyFirstUnitTests $ dotnet new xunit The template "xUnit Test Project" was created successfully.
Support for .NET Core testing in Resharper is scheduled for 2016.3
The workaround is to use Visual Studio Test Explorer. (Test --> Windows --> Test Explorer)
The project.json file must contain xunit
and dotnet-test-xunit
:
{
...
"testRunner": "xunit",
"dependencies": {
...
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
},
...
}
Rebuild your project and you should be able to successfully run your tests. If you have Visual Studio 2015 you can start your test inside the code.
Update: (2017-02-08)
It also works with nunit
;
{
"testRunner": "nunit",
"dependencies": {
...
"NUnit": "3.5.0",
"dotnet-test-nunit": "3.4.0-beta-3"
},
...
}
ReSharper doesn't currently support .net core testing. This is scheduled for 2016.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With