Skip to content
| Marketplace
Sign in
Visual Studio>Tools>NSpec VS Adapter
NSpec VS Adapter

NSpec VS Adapter

BrainCrumbz

|
157 installs
| (0) | Free
A test adapter to run NSpec tests from Test Explorer window in Visual Studio 2013 and later.
Download

NSpec.VsAdapter

NSpec.VsAdapter is a test adapter to run NSpec tests from Test Explorer in Visual Studio. It runs tests from projects targeting classic .NET Framework. It is available both as a Visual Studio Extension (for VS 2013, 2015) as well as a NuGet Package (for VS 2017). VS Extension for 2017 is under development.

Minimum requirements

It currently supports test projects based on .NET Framework 4.5 and later, and NSpec 1.0.x.

As an extension, it can work in Visual Studio 2013 and 2015, Community Edition and above. As a NuGet package, it can work in Visual Studio 2017, Community Edition and above.

NOTE: To work with old project.json-based .NET Core projects, please try dotnet-test-nspec runner. Support for MSBuild-based .NET Core projects is under development. Again, support for VS 2017 Extension is under development as well.

Usage

Installation

Open Extensions and Updates window from within Visual Studio and type nspec vs in search field, then download this extension showing on top. That's it.

When you want to install this extension on more than one Visual Studio version at once, or when you don't have Visual Studio already open, you can browse to this extension page on Visual Studio marketplace, download it locally to your machine and double click on grabbed VSIX file.

Launch

Open a solution in Visual Studio with at least one NSpec test project, then build all. Open VS Test Explorer window and wait until list gets populated with test specifications from all projects. Click on Run All or select some tests to be run. You can also group specifications based on project, or nspec-derived class, or trait.

Configuration

This Visual Studio test adapter can be configured by using a .runsettings file (see MSDN). Currently supported file format is:

XML
<?xml version="1.0" encoding="utf-8"?>  <RunSettings>    <!--    ... other settings ...    -->      <!-- NSpec VS Adapter -->    <NSpec.VsAdapter>      <LogLevel>Debug</LogLevel>    </NSpec.VsAdapter>    </RunSettings>

Currently supported settings are:

 

Name

Type

Values

Description

LogLevel

String

Trace, Debug, Info, Warn, Error

Minimum log level to show. Log messages with a level lower than this will not be shown.

 

An example of such a file can be found in test source code at sln/test/Samples/samples.runsettings.

Breaking changes

To check for potential breaking changes, see BREAKING-CHANGES.md.

Contributing

See CONTRIBUTING doc page.

License

MIT.

Credits

NSpec.VsAdapter is written by BrainCrumbz. It's shaped and benefited by hard work from our contributors.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft