How to run xUnit 2.1.0-beta- * for DNX projects using ReSharper

How to run xUnit 2.1.0-beta- * for DNX projects using ReSharper?

When ReSharper actually finds the tests, it does not work when you run them with a System.IO.FileNotFoundException, which indicates that the unit test assembly was not found.

Due to my understanding, DNX projects DO NOT generate assemblies in the \ bin folder when compiling with VisualStudio 2015. Is there a way to force DNX projects to generate assemblies similar to tranditional class library projects?

Any ideas?

+2
source share
2 answers

DNX tests are not currently supported by ReSharper or the xunit plugin. This is a completely new execution model and has not yet been implemented for ReSharper. I expect to see support when DNX and asp.net are stabilized and close to release.

+2
source

xUnit now supports DNX. Not sure if this will allow you to run tests from ReSharper, though.

Here are the instructions taken from https://github.com/xunit/dnx.xunit :

This runner supports xUnit.net tests for DNX 4.5.1+ and DNX Core 5+ (including ASP.NET 5+). Using

To install this package, make sure your project.json contains the following lines:

{ "dependencies": { "xunit": "2.1.0-*", "xunit.runner.dnx": "2.1.0-*" }, "commands": { "test": "xunit.runner.dnx" } } 

Use the following to run tests from the command line.

 # Restore NuGet packages dnu restore # Run tests in current directory dnx test # Run tests if tests are not in the current directory dnx -p path/to/project test 
0
source

All Articles