The switch from the project.json format to the new csproj based format for .NET Core and .NET Standard projects also changed the API for test adapters. Because of this, NUnit’s dotnet-test-nunit adapter stopped working and we had to update our existing Visual Studio test adapter to support .NET Core. Last night I released the first alpha release of the test adapter to NuGet enabling testing of .NET Core and .NET Standard projects using Visual Studio 2017, Visual Studio Code, TFS Build, and, the dotnet test CLI command.
Writing Visual Studio Extensions has gotten much easier with recent versions of Visual Studio, but figuring out how to debug them can be hard. When you debug an extension, you run it in an instance of Visual Studio using a separate set of settings called an experimental hive. When you launch this from Visual Studio, it takes care of installing your extension and the debugger is attached to Visual Studio itself.
Most .NET developers write code using Visual Studio, so it is convenient to be able to run and debug your NUnit tests from within Visual Studio. There are commercial products like TestDriven.NET, NCrunch and Resharper that can run your tests, but the NUnit Visual Studio Adapter is free and works in all current editions of Visual Studio. (more…)
You have a new project and you want to add unit tests, where do you start? This tutorial walks you through adding an NUnit test project, writing your first tests and running them in Visual Studio.
This walk-through assumes you already have a project that you want to test. I am starting here with a project that contains a simple class that contains an extension method that converts an enum value to a friendly string by splitting the enum name at capitals. For example, System.Windows.Forms.Keys.BrowserBack would become “Browser Back”. (more…)