Visual Studio Toolbox

Top 10 Free New Testing Tools for Visual Studio 2019

A lot of buzz accompanied Microsoft's sneak peak at the next big milestone release of its flagship IDE, Visual Studio 2022, but developers are still churning out useful tools for VS 2019, which we'll be using for a while. You can find new extensions for customizing and adding all kinds of functionality to your favorite IDE to optimize your coding experience. Here's a look at some of the newest offerings for testing.

Testing can be a thorny issue for many coders who just want to write code and relegate unit testing and other techniques to specialists in that field. But with resources being stretched thin these days, coders often have to be test jockeys too. Luckily the Visual Studio Marketplace for VS 2019 has more than 130 free extensions to help.

In this article, "newest" refers not only to a tool's publish date but also the most recent update, as those can turn many time-honored extensions into basically new ones. I've also emphasized popularity (number of installs) and high reviewer ratings in curating this list of the top 10 free tools (in no particular order).

  1. Unit Test Boilerplate Generator from RandomEngy is a free tool (45K installs) that's earned an average 4.8 rating (0-5 scale) from 28 developers who reviewed it. As it's name suggests, it can work up a unit test boilerplate for a C# class, complete with mocks for all dependencies. Along with two dependency injection modes and support for the VS testing framework, it supports NUnit and xUnit frameworks, while mock framework support covers:

    • FakeItEasy
    • JustMock
    • Moq + AutoMoq
    • NSubstitute
    • Rhino Mocks
    • SimpleStubs
    A Right-Click in Solution Explorer Creates a Unit Test Boilerplate
    [Click on image for larger view.] A Right-Click in Solution Explorer Creates a Unit Test Boilerplate (source: VS Marketplace).

    Although one developer remarked a few months ago that he couldn't get it to work on VS 2019, another developer said it was working normally in v16.8.5. "A great time saver!" said one reviewer in February. "Will definitely try to create a PR for personal needs that others might find interesting. Kudos to the author and their fast response in the Q&A threads!" It was updated about a month ago.

  2. Staying in the unit testing space, Fine Code Coverage from Fortune Ngwenya has been installed nearly 18K times, with a near-perfect 4.9 rating from 67 reviewers. It helps developers visualize unit test code coverage on .NET Core (now just .NET 5) and even the old .NET Framework. Specifically, visualization functionality enables coders to:

    • Get highlights on the code being tested
    • Get highlights on the code doing the testing
    • See coverage view
    • See summary view
    • See risk hotspots view

    The tool was last updated in late March, with the last code commit just a week ago, showing that the author is keeping it current.

  3. Turning to static code analysis, the popular (142K installs) SonarLint for Visual Studio 2019 from SonarSource was just updated yesterday (May 6). The extension leverages Roslyn (.NET Compiler Platform) to help users find and fix bugs and issues in C#, VB.Net, C, C++ and JavaScript files. With a growing number of rules now numbering in the hundreds, it uses pattern matching and dataflow analysis to facilitate deep code analysis algorithms. It even provides help to resolve any issues found. While it can be connected to the SonarQube server or SonarCloud to share rulesets, get event notifications and use a resolution flow, it can also be used offline, disconnected from those resources. Twelve reviewers awarded it an average 4.1 rating.
  4. Debugging, of course, is integral to testing, and here the Debug Attach Manager extension from Viktor Karpach fits the bill. It does one thing and it does it well: It helps you attach the Visual Studio debugger to web application pools, windows services and other processes. In fact, you can search for processes (such as IIS application pool-specific processes) and then attach to them while automatically saving selected processes between Visual Studio restarts. You can also attach to multiple processes at once, providing great functionality for web developers.

    You Can Search Processes by Name, Process ID or Command Line
    [Click on image for larger view.] Debug Attach Manager Lets You Can Search Processes by Name, Process ID or Command Line (source: VS Marketplace).

    Debug Attach Manager is nearing 28K installs, with an average 4.3 rating from 26 reviewers. It works with VS editions going back to 2013, just in case there are still any of those being used.

  5. While it's open source, SpecFlow for Visual Studio 2019 from SpecFlow is a professional-grade, comprehensive offering complete with links for documentation, getting started, FAQ, GitHub repos and a privacy policy -- but it's still free. As such, it's earned a near-perfect 4.9 rating from 27 reviewers and has been installed almost 178K times.

    It's described as "Cucumber for .NET," referencing the commercial Cucumber Behavior Driven Development (BDD) tool. BDD is associated with agile software development, which encourages collaboration among developers, quality assurance, and non-technical/business players to create, test and ship projects.

    "SpecFlow bridges the communication gap between domain experts and developers by binding business readable behavior specifications and examples to the underlying implementation," the tool's site states. "Our mission is to provide a pragmatic and frictionless approach to Specification-By-Example for .NET projects." Specification by example (SBE) is defined by Wikipedia as "a collaborative approach to defining requirements and business-oriented functional tests for software products based on capturing and illustrating requirements using realistic examples instead of abstract statements." Thus SpecFlow helps .NET development teams define, manage and execute automated acceptance tests as business-readable specifications. Along with BDD, SpecFlow also supports another concept closely associated with SBE: Acceptance Test Driven Development (ATDD). It was updated last month, with the last commit occurring three weeks ago.

  6. "I love working with complex regular expressions," said no developer ever. OK, I'm just influenced by personal experience -- I'm sure there are such people out there ... somewhere. Hey, if ([^e]|e([^s]|s([^\.]|\.([^c]|c([^o]|o([^m]|m([^p]|p([^\.]|\.([^o]|o([^ +s]|s([^\.]|\.([^l]|l([^i]|i([^n]|n([^u]|u[^x]))))))))))))))) is your cup of tea, have at. Anyway, Regex Editor from Georgy Losenkov might help with stuff like that. It's another niche tool that does one thing: edit and test regular expressions.

    Specifically it lets developers:

    • Test all main methods of the Regex class: Match, Replace, Split
    • Generate sample code (C# and Visual Basic) using your input
    • Treat input as multiple samples (one sample per line)
    • Provide coloring for patterns
    • Provide coloring for replacement strings
    • Provides coloring for input strings when testing Match method
    • Highlights segments of the input string corresponding to selected node in the tree when testing Match method
    Regex Editor
    [Click on image for larger view.] Regex Editor (source: VS Marketplace).

    It has been installed more than 8K times, earning our first perfect 5.0 rating from nine reviewers, last updated in December 2020.

  7. Telerik Testing Framework comes from the well-known maker of many professional, for-pay .NET controls and tools, now under the Progress umbrella. But it's a free web testing framework designed to help you automate HTML5, AJAX, Silverlight (remember that?) and Windows Presentation Foundation (WPF) applications. Benefits listed by the company include a rich API, LINQ support, browser abstraction, and special wrappers for the company's RadControls. With built-in support for NUnit, MbUnit or XUnit unit testing tools, it was updated last month, though it's been around for many years. Only two developers have reviewed it (4.5) and its entry has been clicked 3,382 times.

  8. Azure DevOps Test Connector from MadeUpExtensions works with the aforementioned SpecFlow, supporting the creation of Specflow Scenario Outline tests. It lets coders use attributes in order to link to Test Classes and SpecFlow Feature files with Azure DevOps Test Plans/Suites and Cases. The tool's GitHub repo says "This allows a Test Automation Engineer to quickly synchronize their latest work in Visual Studio with Azure DevOps, saving time by automatically creating and linking Test Plans, Test Suites (both static and requirements based) Test Cases and Specflow Test Steps." It earns another perfect 5.0 rating, though it has only three reviews. The last update came in February.

  9. Run Coverlet Report from Chris Dexter is another utility to ease showing code coverage, this one aiming to duplicate Visual Studio Enterprise functionality for free (sorry, Microsoft).

    Its description reads: "Run Coverlet Report builds upon the excellent Coverlet and Report Generator tools that allow you to collect code coverage results from unit tests. This extension will run the two tools and then display the report file within visual studio as well as use the Coverlet output to provide syntax highlighting." Coverlet, stewarded by the .NET Foundation, is an open source project providing a cross-platform code coverage framework for C#. Report Generator, according to its GitHub site, converts coverage reports generated by Visual Studio and many other tools into human-readable reports in different formats. Those two tools must be available to use this extension.

    Run Coverlet Report in Animated Action
    [Click on image for larger, animated GIF view.] Run Coverlet Report in Animated Action (source: VS Marketplace).

    With more than 2K installs, this tool was last updated in late March. It garnered yet another 5.0 rating, this time from five reviewers.

  10. Finally, we return to where we started, with unit testing. Test Adapter for Catch2 from Johnny Hendriks is for the C++ crowd, specifically providing a test adapter for working with the Catch2 unit test framework. "Within Visual Studio, the Test Explorer is a convenient way to run and debug unit tests," says Hendriks, adding that his tool adds support for Catch2.

    Catch2 v3 is currently in the works, its GitHub site states. Along with Catch2 being a unit testing framework for C++, it also provides basic micro-benchmarking features, along with simple BDD macros.

    The extension works with VS 2019 and VS 2017, having been installed 6K times and earning a 4.6 rating from five reviewers. It was last updated in March.

So what's your favorite Visual Studio testing tool? Please share your thoughts in the comments section below.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

  • TypeScript Tops New JetBrains 'Language Promise Index'

    In its latest annual developer ecosystem report, JetBrains introduced a new "Language Promise Index" topped by Microsoft's TypeScript programming language.

Subscribe on YouTube