I am using the latest VS2017 version 15.6.4, NUnit3TestAdapter 3.10.0 and Nunit version 3.9.0.0.
When I try to run a unit test in Test Explorer the test are grayed out, when I right click and and run selected tests I see the following error: No test is available Here is how my test class looks
[TestFixture] public partial class ListViewBOTest { [Test] public void TestSearch_DateTime() { Assert.AreEqual(1,0); } }
Text from output:
[3/26/2018 10:53:55 AM Informational] ------ Run test started ------ [3/26/2018 10:53:55 AM Informational] NUnit Adapter 3.10.0.21: Test execution started [3/26/2018 10:53:55 AM Informational] Running all tests in C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll [3/26/2018 10:53:56 AM Informational] NUnit failed to load C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll [3/26/2018 10:53:56 AM Informational] NUnit Adapter 3.10.0.21: Test execution complete [3/26/2018 10:53:56 AM Warning] No test is available in C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again. [3/26/2018 10:53:56 AM Informational] ========== Run test finished: 0 run (0:00:01.0435303) ==========
Ignored tests are displayed by the runners as warnings in order to provide a reminder that the test needs to be corrected or otherwise changed and re-instated.
The NUnit Test Adapter allows you to run NUnit tests inside Visual Studio. The current release, version 2-0, is designed to work with Studio 2012 (All updates), Visual Studio 2013 (All updates) and Visual Studio 2015 (tested with all pre-releases, checked April 2015).
Right-click the References item and then click Add Reference. Select Project | Add Reference from Visual Studio's main menu. In the Reference Manager, click Browse. Browser for nunit.
Make sure you have installed the NUnit3 Test Adapter from here
https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter
Can you check the following steps and see if it works?
Test > Test Settings > Default Processor Architecture
and make a note if X86
is selected or X64
Build
section in the Properties
window of the project where the tests are written. Make sure the Platform target
drop-down is selected to either Any CPU
or at least it matches the architecture from the above step 1
.Now if you build the solution and try running those tests, you should see that they are now running.
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