Visual Studio Test Explorer does not find the tests

Asked

Viewed 1,762 times

3

I’m having a difficulty in Visual Studio 2013, Test Explorer is not loading the tests at any time, either after Build, or through Run Tests / CTRL+R, T. Does anyone have any clue what it might be?

I have the following packages installed through Nuget: xUnit.net,xUnit.net: Runners, Fluent Assertions, and the test below as an example:

using Xunit;
namespace Registro
{
    public class CadastroValidoRecebido
    {
        [Fact]
        public void Usuario_Adicionado_Ao_Sistema()
        {

        }
    }
}

I followed hits of several links, what seemed promising were the changes of processor architecture informed in the link below, but the Test Explorer continues without locating the tests.

https://stackoverflow.com/questions/13533259/why-does-visual-studio-2012-not-find-my-tests

2 answers

2


As I recall, Visual Studio does not recognize third-party testing (i.e., not Mstest) automatically, requiring the installation of additional packages at the same time.

Take a look at this for the xunit (I’m not sure if this is it, but test there please):

xUnit.net Runner for Visual Studio 2012 and 2013

You can also try Resharper... is paid, but I am absolutely fan of the tool. From what I read about it, supports xunit via plugins.

  • 1

    Hello, Miguel. Thanks for the reply, I mistakenly thought that the xUnit.net: Runners (https://www.nuget.org/packages/xunit.runners/1.9.2) would be the plug-in that would work in Visual Studio 2013, after installing that informed by you the tests appeared.

  • In my case the tests were written with Nunit 2.0, and so I had to add the corresponding extension of "Runner" to Visual Studio.

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.