New version of the NUnit 2 adapter supporting Visual Studio 2019

The NUnit 2.X framework have been superseded by the NUnit 3 framework several years ago. Each framework “family” needs a separate adapter, one for the V2 and one for the V3. The V3 have been maintained continuously, and have 3-4 releases per year. The V2 adapter however, has not been updated since mid 2017. The Continue Reading →

VSIX based Test Adapters to be deprecated in Visual Studio for C# and Visual Basic to speed up testing

Test Adapters come in two flavors, VSIX based and Nuget based. The VSIX based are installed as extensions to Visual Studio and therefore will apply to all solutions you load, The Nuget based adapter packages must be installed at least into one project in your solution and will only work for that solution. All versions Continue Reading →

How to conditionally fail a build in a pull requests with TFS/VSTS

When your TFS/VSTS CI build is also used for a pull request, you often want to enable more checks before you let this go into the master (or any target) branch, and fail the build if these raise warnings. It can be extra tests you want to run, code quality checks,  process checks, and  you Continue Reading →

How to resolve cases of Visual Studio “No tests appearing”

The Visual Studio Test Explorer can be a bit picky about showing tests.  There are multiple reasons for why they don’t always show up when you expect them to do, and most of the cases are PEBKAC type of issues.  That doesn’t mean it is easy, there are just becoming too many variations, and Visual Continue Reading →

WrapThat.System : Wrappers for system.io to simplify unit testing

Introduction You have all seen it, you have all done it: Written code using the static methods from the System.IO namespace for handling directories and files.   Or, you are maintaining legacy code where that usage is common in certain places.  And now the code is huge,  you have no unit tests, because unit testing classes Continue Reading →

How to control the selection of test runner in TFS/VSTS, making it work with x86/x64 selected targets

When you do test runs with the Test Explorer in Visual Studio, you can select to use either a x86 or a x64 test runner.  Now, if you select to create an AnyCPU target for that component, it will not matter which one you choose, but if you select a target x86 or x64, the Continue Reading →

Fix for the ‘Could not find test executor’ issue with NUnit, XUnit and Chutzpah when using ReSharper in Visual Studio

This issue is resolved in the latest ReSharper release, version 8.2.0.2160, download here.  The issue appears when using the Test Explorer to run tests in any of the frameworks mentioned in the title.  The tests are shown in the Test Explorer, but are not executed.  It may look like this: Note:  The tests shown dimmed Continue Reading →

How to exclude code from Code Coverage in Visual Studio unit testing using runsettings

Download:  VS2012 Runsettingstemplate   VS2013 Runsettingstemplate The VS2012/13 unit test feature can generate code coverage results.  It can do so for (nearly) any type of adapter you choose to use, MSTest, CPPTest (managed/native), XUnit and NUnit (but not Chutzpah (note 1)). Assume you have a project with a set of unit tests included.  For this demonstration Continue Reading →

Unit testing resources and articles for Visual Studio 2012 and 2013

The last year I have written three blog posts for the Microsoft MSDN ALM blog on unit testing. The posts focused on the new test explorer with its abilities to run tests in multiple frameworks, and utilizing traits to filter what to run, both in Visual Studio and on TFS Build.  I covered the adapters Continue Reading →