0

Here is my problem.

I have created a new class in my unit test project and added the TestFixture attribute to the class.

I have then added the TestMethod and built the project. The problem is that Test Explorer does not find the test so I cannot run it!

<TestFixture()> _
Public Class _SmokeTests

<TestMethod()>
Public Sub ServiceIsAccessible()
Pages.BaseNavigation.GoToLoginPage()
Assert.IsTrue(Pages.loginPage.IsAtPage())
End Sub

If I change 'TestFixture' to 'TestClass' then the test is found, but this is not what I want as I believe I need 'TestFixture' to run the 'TestFixtureTearDown' methods etc.

I am using VS2013.

Any help is appreciated!

levis84
  • 974
  • 1
  • 12
  • 27
  • perhaps you already have a class called TextFixture? – Claudius Mar 02 '16 at 16:37
  • 1
    Have you installed either the NUnit Test Adapter or the NUnit 3 Test Adapter as an extension? Does the adapter you installed match the version of NUnit you are using in your project? – Rob Prouse Mar 02 '16 at 16:46
  • 1
    Test Class and TestMethod are MsTest attributes rather than NUnit. Sounds as if your tests are not referencing NUnit at all. – Charlie Mar 02 '16 at 20:52

1 Answers1

0

OK so I have sorted the issue - it was a version mismatch.

As I am using NUnit (3.0) I needed to install NUnit3 Test Adapter.

NUnit Unit tests not showing in Test Explorer with Test Adapter is installed

Thanks everyone for your time.

Community
  • 1
  • 1
levis84
  • 974
  • 1
  • 12
  • 27