Build/Test Issues

No tests found since migrating from NUnit to Xunit

Started by qujck on 5,367 views

I have spent the last few hours converting 914 unit tests from NUnit to Xunit (xUnit.net 2.0.0 build 2700) - the solutions compile and TestDriven.NET can run all the tests but NCrunch is reporting that there are no tests.

Am I missing a config setting or something?


------ Test started: Assembly: My.System.Tests.Unit.dll ------
697 passed, 0 failed, 0 skipped, took 20.18 seconds (xUnit.net 2.0.0 build 2700).

------ Test started: Assembly: My.Data.Tests.Unit.dll ------
217 passed, 0 failed, 0 skipped, took 4.17 seconds (xUnit.net 2.0.0 build 2700).

========== Total Tests: 914 passed, 0 failed, 0 skipped, took 24.45 seconds ==========


External image

(The 53 ignored tests are MSTests in a separate project.)

Things I've tried

  • re-run the Configuration Wizard
  • disabled and re-enable NCrunch
  • deleted all [h]ncrunchproject[/h] and the [h]ncrunchsolution[/h] file

Edited

Hi, thanks for posting!

This is a known issue - see here for more information.

NCrunch v2.8 is being updated to work with the latest beta of xunit (2700), though I believe a new build of xunit isn't far away. Considering the effort you've made to port your tests over, it may be easier to simply switch to a slightly earlier beta of xunit 2 in order to get your test suite working.

Post a reply

Log in to reply.