Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run nunit tests with asp.net 5 projects, especially with ReSharper?

I am developing an asp.net 5 application targeting dnx451.

The asp.net 5 project relies some libraries with unit-tests written for nunit 2.x. So the reasonable choice for me is to use nunit for testing the asp.net 5 project.

When I running the unit test in ReSharper, the ReSharper says "Test not run" with additional message "System.IO.FileNotFoundException: Could not load file or assembly xxx ".

Both nunit 2.6.4 and 3.0.0-beta-2 results the same error.

Any one has successfully running nunit tests against an dnx project?

like image 743
Smartkid Avatar asked Oct 20 '22 09:10

Smartkid


1 Answers

DNX tests aren't currently supported by ReSharper. It's a whole new execution model, and hasn't yet been implemented for ReSharper. I'd expect to see support as DNX and asp.net stabilise and near release. Also, I don't believe nunit itself supports running as a DNX test runner - the xunit team have a separate project to plug into DNX: https://github.com/xunit/dnx.xunit

like image 144
citizenmatt Avatar answered Oct 22 '22 21:10

citizenmatt