Updating Plugins for SpecFlow 3

This article covers updating existing plugins to work with SpecFlow 3. If you are interested in developing your own plugins, the documentation for SpecFlow plugins is here. This documentation includes links to sample plugins that you can use as a basis for developing your own.

Overview

With SpecFlow 3, the plugins you want to use are no longer configured in your app.config file. To use existing plugins with SpecFlow 3, the easiest way is to package your plugin as a NuGet package and edit the .targets and .props files as described below. These files need to have the same name as your NuGet package.

As part of the configuration of your plugin, you also need to determine which plugin assembly to load based on whether you are using Full Framework or .NET Core.

Generator Plugins

To update your generator plugin:

  1. Package your plugin as a NuGet package if you haven’t already.
  2. The actual DLL to reference is determined in the .targets file. You need to load a different version of the plugin depending on which version of MSBuild you are using (Full Framework vs .NET Core). Using the xUnit .targets file as an example (the file is here):
    <PropertyGroup> 
       <_SpecFlow_xUnitGeneratorPlugin Condition=" '$(MSBuildRuntimeType)' == 'Core'" >netstandard2.0</_SpecFlow_xUnitGeneratorPlugin> 
       <_SpecFlow_xUnitGeneratorPlugin Condition=" '$(MSBuildRuntimeType)' != 'Core'" >net471</_SpecFlow_xUnitGeneratorPlugin> 
       <_SpecFlow_xUnitGeneratorPluginPath>$(MSBuildThisFileDirectory)\$(_SpecFlow_xUnitGeneratorPlugin)\TechTalk.SpecFlow.xUnit.Generator.SpecFlowPlugin.dll</_SpecFlow_xUnitGeneratorPluginPath> 
    </PropertyGroup> 
    

    .
    Which plugin to use is determined based on the MSBuildRuntimeType (either “Core” or another value). “netstandard2.0” and “net471” are the directories containing the corresponding DLL for each runtime.

  3. Edit the .props file in your package to include your plugin’s path. You need to add an ItemGroup containing the SpecFlowGeneratorPlugins element to this file.
    Using the .props file for the generator plugin for xUnit (located at /Plugins/TechTalk.SpecFlow.xUnit.Generator.SpecFlowPlugin) as an example, the .props file is configured like this:

    <ItemGroup> 
      <SpecFlowGeneratorPlugins Include="$(_SpecFlow_xUnitGeneratorPluginPath)" />
    </ItemGroup> 
    

    This adds the plugin’s fully qualified path to the list of SpecFlowGeneratorPlugins.

Runtime Plugins

Like generator plugins, runtime plugins are also no longer configured in your app.config file. Instead, SpecFlow loads all files ending with .SpecFlowPlugin.dll found in the following locations:

  • The folder containing your TechTalk.SpecFlow.dll file.
  • The current working directory

To update your runtime plugin:

  1. The actual DLL to reference is determined in the .targets file. You need to load a different version of the plugin depending on the target framework of your project (Full Framework vs .NET Core). Using the xUnit .targets file as an example (the file is here):
    <PropertyGroup> 
       <_SpecFlow_xUnitRuntimePlugin Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' ">netstandard2.0</_SpecFlow_xUnitRuntimePlugin> 
       <_SpecFlow_xUnitRuntimePlugin Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">net45</_SpecFlow_xUnitRuntimePlugin> 
       <_SpecFlow_xUnitRuntimePluginPath>$(MSBuildThisFileDirectory)\..\lib\$(_SpecFlow_xUnitRuntimePlugin)\TechTalk.SpecFlow.xUnit.SpecFlowPlugin.dll</_SpecFlow_xUnitRuntimePluginPath> 
    </PropertyGroup> 
    

    .
    Which plugin to use is determined based on the TargetFrameworkIdentifier (either “.NETCoreAPP” or “.NETFramework”). “netstandard2.0” and “net45” are the directories containing the corresponding DLL for each runtime.

  2. Edit the .props file in your package to include your plugin’s path. Because .NET Core does not copy the referenced files to your target directory, you need to add your runtime plugin to the None ItemGroup and set CopyToOuputDirectory to “PreserveNewest” to ensure the plugin is copied.
    Using the props file for the xUnit plugin (located at /Plugins/TechTalk.SpecFlow.xUnit.Generator.SpecFlowPlugin) as an example:

    <ItemGroup> 
      <None Include="$(_SpecFlow_xUnitRuntimePluginPath)" > 
        <Link>%(Filename)%(Extension)</Link> 
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
        <Visible>False</Visible> 
      </None> 
    </ItemGroup> 
    

Plugin Developer Channel

We have set up a Gitter channel for plugin developers here. If you questions regarding the development of plugins for SpecFlow, this is the place to ask them.

SpecFlow Visual Studio Extension Updated

We have released a new version of the Visual Studio Extension that adds two new features.

IntelliSense for Table Column Headings

The auto-complete suggestions now also display column names from tables in your feature files:

A bit thanks to slig3 for adding this feature that will surely be appreciate by many users!

Reformatting Feature Files

This feature adds documenting formatting support to the Gherkin editor:

  • Normalise indents with different indentation levels for different sections, and the ability to choose between tabs and spaces
  • Normalise line breaks
  • Format all tables

There are a number of options that configure the behaviour under Tools | Options | SpecFlow.

Thanks to claudiobernasconi, littlegenius666 and dreamescaper for adding this feature!

Changes to the SpecFlow Visual Studio Extension

The Visual Studio extension has been updated for SpecFlow 3. The following is a summary of the changes.

Visual Studio 2019 Support

The latest version of the Visual Studio extension is compatible with Visual Studio 2019.

Legacy Single File Generator

We strongly recommend using the MSBuild integration to generate your code behind files. However, when you first install the new Visual Studio extension, it will be set to use the legacy code behind file generation method using SpecFlow’s single file generator.

To use the MSBuild integration, you need to disable this legacy support in the options in Visual Studio. To do so:

  1. Select Tools | Options from the menu in Visual Studio.
  2. Browse to SpecFlow | General in the list on the left (you can use the search field to restrict the options).
  3. Set Enable SpecFlowSingleFileGenerator CustomTool to false under Legacy.
  4. Click OK.

You also need to ensure that SpecFlowSingleFileGenerator is not entered in the Custom Tool field of your feature files.
Custom Tool

If you do not remove this entry, you will receive an error (“SpecFlow designer codebehind generation is not compatible with MSBuild codebehind generation. The custom tool must be removed from the file.”)

Context Menu Options Removed

The following options have been removed from the context menu:

  • Run SpecFlow Scenario
  • Debug SpecFlow Scenario

These options were removed due to the require APIs no longer being available, and due to these options being unreliable and causing a lot of issues.

Renaming Steps

Steps can now be renamed and the changes to the step name are propagated automatically to your code. Big thanks to slig3 for this contribution!

To rename a step:

  1. Open the feature file containing the step.
  2. Right-click on the step you want to rename and select Rename from the context menu.
  3. Enter the new text for the step in the dialog and confirm with OK.
  4. Your bindings and all feature files containing the step are updated.

Note: If the rename function is not affecting your feature files, you may need to restart Visual Studio to flush the cache.

Updating to SpecFlow 3

IMPORTANT INFORMATION

Changelogs

You can find an overview of the new features in SpecFlow and SpecFlow+ Runner here. The full changelog for SpecFlow is here.

More information on using SpecFlow with .NET Core can be found here.

Make a Backup!

Before upgrading to the latest version, ensure you have a backup of your project (either locally or in a source control system).

Visual Studio Integration

The Visual Studio integration for SpecFlow has been updated for SpecFlow 3. You will need to update the extension in order to upgrade. If you previously set the extensin to not update automatically, please enable automatic upgrades once your projects have been migrated to SpecFlow 2.3.2 or higher.

WARNING!
The new extension is only compatible with SpecFlow 2.3.2 or higher! Do not upgrade upgrade the SpecFlow Visual Studio integration until you have migrated all your projects to at least SpecFlow 2.3.2, otherwise you will need to switch between Visual Studio extensions whenever you switch between projects.

If you have projects that are using an earlier version of SpecFlow (prior to 2.3.2), you can download previous versions of the extension from this page on GitHub. If you download an earlier version, please make sure you disable the option to update the extension automatically, otherwise it will be automatically updated with the new version again!

To prevent the Visual Studio integration from automatically updating:

  1. Select Tools | Extensions and Updates from the menu in Visual Studio
  2. Locate the SpecFlow extension in the list using the search field on the right, if necessary.
  3. Disable the Automatically update this extension option on the right.
  4. Don’t forget to enable this option again once you have upgraded to SpecFlow 2.3.2 or higher!

App.config Deprecated

Changes to How Unit Test Providers are Configured

In previous versions of SpecFlow, the unit test provider used to execute tests was configured in your app.config file. As of SpecFlow 3, we strongly recommend configuring your unit test provider by installing one of the available packages (see below).

specflow.json

Moving forward, we recommend using specflow.json to configure SpecFlow, rather than app.config. .NET Core projects require specflow.json (app.config is not supported). While using specflow.json is optional for Full Framework projects, we recommend migrating to the new format. For more details, see Configuration in the documentation.

Updating SpecFlow

To upgrade a solution from SpecFlow 2.x to SpecFlow 3:

  1. Open your solution, and check that it compiles, all tests are discovered and that all source files have been committed.
  2. Right-click on your solution and select Manage NuGet Packages for Solution.
  3. Switch to Updates in the list on the left and locate SpecFlow in the list of packages. Use the search box to restrict the listed packages if necessary.
  4. Select the SpecFlow package in the list and click on Update.
  5. Add one of the following packages to your specifications project (the one containing your tests) to select your unit test provider:
    • SpecRun.Runner
    • SpecFlow.xUnit
    • SpecFlow.MsTest
    • SpecFlow.NUnit

    Note: You will receive an error if you add more than one of these packages to your project.

  6. Add the SpecFlow.Tools.MsBuild.Generation NuGet package to your project. This package is used to generate SpecFlow’s code-behind files.
  7. Open your project file and add the following section to the end of the file (but before the final </project> tag):

    <Target Name="AfterUpdateFeatureFilesInProject">
        <!-- include any generated SpecFlow files in the compilation of the project if not included yet -->
        <ItemGroup>
            <Compile Include="**\*.feature.cs" Exclude="@(Compile)" />
        </ItemGroup>
    </Target>
    
  8. Remove “SpecFlowSingleFileGenerator” from the Custom Tool field in the Properties of your feature files.

Updating SpecFlow and SpecFlow+ Runner

If you want to update both SpecFlow and SpecFlow+ to version 3, the easiest way to do this is to simply upgrade the SpecRun for SpecFlow package. This automatically updates SpecFlow as well.

To update SpecFlow and SpecFlow+:

    1. Open your solution, and check that it compiles, all tests are discovered and that all source files have been committed.
    2. Right-click on your solution and select Manage NuGet Packages for Solution.
    3. Uninstall any SpecRun.SpecFlow packages you have installed.
    4. Install/update the following packages:
      • SpecFlow
      • SpecRun.SpecFlow
      • SpecFlow.Tools.MsBuild.Generation
    5. Open your project file and add the following section to the end of the file (but before the final </project> tag):

      <Target Name="AfterUpdateFeatureFilesInProject">
          <!-- include any generated SpecFlow files in the compilation of the project if not included yet -->
          <ItemGroup>
              <Compile Include="**\*.feature.cs" Exclude="@(Compile)" />
          </ItemGroup>
      </Target>
      
    6. Remove “SpecFlowSingleFileGenerator” from the Custom Tool field in the Properties of your feature files.

Migrating your License

Prior to SpecFlow 3, licenses were stored in the Windows registry. In order to support .NET Core, the license information is now stored in a file in your local file system. There is also a new licensing tool for .NET Core.

If you have already registered a SpecFlow license, you can migrate your license from the registry to the local file using specrun.exe. Migrate your existing license using the following command:
specrun migrate-license

Information on installing the new licensing tool can be found in the documentation.

Running Tests from the Command Line

The command line tool SpecRun.exe does not work with .NET Core projects. To run your tests, use the following command lines instead (depending on your target framework):

  • dotnet test
    Specify the path to your solution or project, or run the command from that folder. See the documentation here.
  • vstest.console.exe
    Specify the path to your test assembly. See the documentation here.

SpecFlow+ Runner Report Templates

If you have customised the SpecFlow+ runner templares, a small change needs to be made to the template for SpecFlow 3:

  1. Open the CSHTML file in the editor of your choice.
  2. Replace the first line with the following:
    @inherits SpecFlow.Plus.Runner.Reporting.CustomTemplateBase<TestRunResult>

SpecFlow 3 is here!

SpecFlow 3 supports .NET Core

Before installing the new version, please read the information on updating to SpecFlow 3. The installation procedure is also covered there.

Information on changes to the Visual Studio extension can be found here.

WHAT’S NEW IN SPECFLOW V3?

New features:

  • Support for .NET Core!
  • Separate addition of default and non-default value comparers. ComparisonException indicates which value comparer was used for each difference
  • Uri and Null value retrievers added
  • BoolValueRetriver can now work with 1 and 0
  • Array & List support for any available item value retriever when instantiating class from Specflow table
  • Syntax and structural changes in value retriever/comparer registration
  • Check for non-default constructors using case-insensitive comparison
  • Add utility to get enum field value from TableRow.
  • Gherkin language data is used instead of an obsolete copy
  • Loader exceptions are appended to the exception message
  • Add CreateInstance<T> support to a TableRow

Fixes:

  • Visual Studio change detection integration for Net.SDK style projects via SpecFlow.Tools.MSBuild.Generation

Changes:

  • Command line options now need to be prefixed with -- (double dash) rather than /

Breaking changes:

  • Registration of value retrievers and comparers has been changed from RegisterValueComparer(___) to ValueComparers.Register(___)
  • Calling CreateInstance on an object with a constructor with default parameters populates the object using the default parameters instead of null values
  • Visual Studio change detection integration for Net.SDK style projects via SpecFlow.Tools.MSBuild.Generation

Known issue:

  • AfterTestRun code fails to complete under certain circumstances, see this GitHub issue for details and possible workarounds.
  • Step bindings from external assembly are not found: set Copy to output directory for specflow.json.

Removed:

  • The functions provided by specflow.exe (generate all, reports) have been removed completely.

You can find the full changelog here.

WHAT’S NEW IN SPECFLOW+ V3?

New features:

  • Support for .NET 2.0, 2.1, 2.2
  • Added DeleteFolder as a new deployment transformation step

Fixes:

  • Reports: Display the correct success rate for retried scenarios
  • Profile files are no longer duplicated in the solution explorer
  • Display failing scenarios with at least one pending or successful retry as randomly failed

Breaking changes:

  • Report generation has been moved to a separate process
  • The base class for reports has been changed from TechTalk.SpecRun.Framework.Reporting.CustomTemplateBase<TestRunResult> to SpecFlow.Plus.Runner.Reporting.CustomTemplateBase<TestRunResult>
    If you have customized the report templates, you will need to edit the first line of your templates accordingly.

Removed:

  • Support for combined test executors (e.g. SpecRun+NUnit and SpecRun+MSTest) has been removed as a result of the new plugin infrastructure

Behavioural changes:

  • If CLR 2.0 is specified as the runtime, SpecFlow+ Runner uses the CLR 4.0 executor.

 

A BIG THANK YOU TO ALL CONTRIBUTORS!

SpecFlow 3 would not have been possible without your contributions. Don’t forget to grab yourself some SpecFlow stickers!

alexvv
atanian123
atmcarmo
banovotz
Blackbaud-ChrisKessel
ChernyavskiyAlex
DanielTheCoder
david1995
Dietatko
epresi
gasparnagy
icnocop
inkinjo
kevinkuszyk
midgleyc
mmajcica
nbalakin
nesli92
nvborisenko
Regenhardt
SabotageAndi
sGeeK44
SirBoxBoxington
slig3
szaliszali
thomasouvre
Tragedian

SpecFlow+ LivingDoc 0.2.19 Released

SpecFlow+ LivingDoc 0.2.19 has been released and is available on the Visual Studio marketplace. This version includes the following changes:

  • Changing the build definition/branch selection or selecting a node in the feature tree updates the URL in the address bar
  • Opening a link to LivingDoc containing a feature/scenario now selects the corresponding drop-down entries and opens the feature tree
  • Opening LivingDoc using a URL that does not contain a definition/branch opens the latest selected build definition and most recently selected branch

Fix:

  • The bottom line of the feature tree is no longer cut off

SpecFlow+ LivingDoc 0.2.17 Released

The new LivingDoc version 0.2.17 is available and it contains the feature of linking feature/scenario tags to certain work items.

This prefix will indicate that the tag marked with it is a special tag that will be connected to the work item.

The way it works is as follows:

  • A prefix for the project should be chosen. This prefix will indicate that the tag marked with it is a special tag that will be connected to the work item.
  • Change the tags in the project’s feature files so that each one contains both the prefix and the id of the related work item (e.g.: if the prefix is @workItem and the id is 3212 the tag should be @workItem3212)
  • In the build, pipeline chooses the LD build step. There’s a new option for setting the prefix. Change it to whatever prefix is set in the project.
  • After a new build is run, the generated LivingDoc will display these connected tags bold, and clicking on them will pop up the related work item in a modal window.

Other things to know:

  • LD only accepts (and matches) a single prefix per project
  • In the project, the tag should consist only of the prefix and the work item number. No separator character is needed nor it is allowed.
  • In the build task where you can define the prefix, it is not obligatory to use ’@’ as a starting character of the prefix, LD will still recognize the prefix in the feature files
  • If there’s a tag in a feature file that is prefixed with this special work item prefix but has no work item number, something that cannot be parsed to a number or a non-existing work item id, the popup window will have no content but will show an error message (e.g. @workItem in itself as a tag would cause such an error message)

SpecFlow 3 VSIX Considerations

As announced here, we need to update the SpecFlow Visual Studio extension (VSIX) for SpecFlow 3. The updates mean the new extension will not be compatible with older versions of SpecFlow ( <2.3.2). We plan to update the SpecFlow Visual Studio extension with the SpecFlow 3-compatible version when SpecFlow 3 is officially released. Note that a preview version of SpecFlow 3 is currently available, more details can be found here.

By default, the extension updates automatically, which will break older projects using versions of SpecFlow prior to 2.3.2. An alternative approach would be to release a dedicated SpecFlow 3 extension. There would then be two separate extensions for SpecFlow, which would avoid the automatic update from breaking old projects. However, we ended up discounting this approach for a number of reasons that are summarised below. Each approach has disadvantages and could potentially cause projects to stop working.

Approach 1: Release a New SpecFlow 3 Extension

In this case, we would release a new VSIX for SpecFlow 3, and leave the current extension online for users of earlier versions.

Pros

  • Users of earlier versions do not have to do anything (i.e. disable automatic updates) to prevent their projects from breaking.

Cons

  • Having two separate versions of a SpecFlow 3 extension in the gallery will cause confusion. Some users will invariably install the wrong version, increasing the number of support issues. This will persist for as long as both extensions are available, i.e. way past the transition period where most users will have migrated from 2 to 3.
  • There will be conflicts if both extensions are installed. There is no way to guarantee that only one of the extensions is installed.
  • Users suddenly need another extension for what appears to be “no good reason”.
  • Punishes users who consistently update to new versions, as these are the ones who need to jump through hoops to use the new release.

Approach 2: Upgrade the Existing Extension

In this case, we would update the existing VSIX for compatibility with SpecFlow 3.

Pros

  • While there may be some short-term confusion and support requests relating to projects suddenly not working (automatic update), these will die down quickly. After ~6 months, the dust will probably have settled.
  • All users will have their extension automatically upgraded to be compatible with the latest version. This is how it has always been.

Cons

  • Requires users not interested in Specflow 3 to make changes to their setup to avoid breaking changes. However, this is a one-off and involves clicking a check box.
  • There will invariably be some users who need to continue using SpecFlow <2.3.2 for now, and who will forget that automatic updates need to be enabled when they make the switch to version 3. Again, the number should decrease as time goes on.

With that in mind, we feel that upgrading the existing extension is better approach. It will cause some teething problems for a few months while the switch is made. After a while, the dust will settle. Conversely, we feel that providing two separate extensions runs the risk of causing confusion due to multiple versions of the extension, and the confusion will persist indefinitely. It will not simply die down after a few months if there are two mutually exclusive extensions available for download.

Your thoughts?

If you think we have overlooked some important aspects or have have alternative suggestions on how to improve the upgrade experience, please share them in the discussion here.

If you have reasons for using older versions of SpecFlow and do not want to regularly upgrade, let us know your motivation too. Both approaches will make it difficult to work with older SpecFlow versions and SpecFlow 3 on the same machine; we are not sure to what extent this could be an issue.

SpecFlow 3 with .NET Core Support: Public Preview now Available

The stable SpecFlow V3 has been released! Check out our latest blog post!

The first public preview of SpecFlow with support for .NET Core is now available. If you want to try out the new version, please read the following information carefully. There are a number of steps that are necessary before you can use the public preview.

Please report any issues you experience here.

IMPORTANT! If you do not plan on updating to SpecFlow 3 soon, please read this announcement for all current users.

Requirements

.NET 4.7.1 is required. Please ensure you have installed the 4.7.1 framework.

Installing the Preview Visual Studio Extension

SpecFlow 3 requires an update to the Visual Studio extension for SpecFlow. During the preview period, you will need to connect to the following feed to download the preview version of the extension:

https://www.myget.org/F/specflow-vsix/vsix/

To do so:

  1. Select Tools | Options in Visual Studio.
  2. Locate Environment in the list, and select the Extensions and Updates sub-item.
  3. Click on Add to add a new feed.
  4. Give the new source a Name (e.g. “SpecFlow 3 preview”) and enter the source (“https://www.myget.org/F/specflow-vsix/vsix/”).
  5. Select Tools | Extensions and Updates. You should see an update listed on the left.
  6. Click on Updates to update the new extension.

Once a stable version of SpecFlow 3 has been released, the new version of the extension will go live for all users, and you can revert to the standard feed.

Supported Frameworks and Runners

The preview version supports the following test frameworks and runners:

  • SpecFlow+ Runner 3.0 or higher
  • NUnit 3.10 or higher
  • MSTest V2 1.3.2 or higher
  • xUnit 2.4.0 or higher

Installing NuGet Packages and Configuring a Unit Test Provider

The unit test provider is no longer configured in your app.config file. Instead, the unit test provider is now configured using plugins for the desired test frameworks. You will therefore need to add one of the following NuGet packages to your project to configure the unit test provider:

  • SpecRun.Runner
  • SpecFlow.xUnit
  • SpecFlow.MsTest
  • SpecFlow.NUnit

Note: Make sure you do not add more than one of the unit test plugins to your project. If you do, an error message will be displayed.

  1. Right-click on your project, and select Manage NuGet Packages.
  2. Enable the Include prerelease option and search for “SpecFlow”.
  3. Install/update the following packages:
    • SpecFlow
    • SpecFlow.Tools.MsBuild.Generation
    • One of the unit test provider packages (see above).
  4. Install the test runner for your unit test provider (e.g. xunit.runner.visualstudio).

Configuration

Much of the configuration has been moved from the app.config file to other locations. When using .NET Core, you can no longer use the app.config file. You need to set general configuration options in the new specflow.json configuration file. This file is optional when using the Full Framework.

The structure of the .json configuration file reflects the structure of the old app.config. Some examples can be found here.

{
    "language":
    {
        "feature": "de-AT"
    }
}

In the above example, the feature file language is set to “de-AT”. This corresponds to the following entry in the app.config file:

<language feature="de-AT" />

If you are using the Full Framework, some settings are still available in the app.config file. However, much has changed, so please read the details below for information on how to configure SpecFlow 3.

Generating Code-behind Files

specflow.exe has been removed. Please use the SpecFlow.Tools.MsBuild.Generation NuGet package to generate the code-behind files, see https://specflow.org/documentation/Generate-Tests-from-MsBuild/

When using .NET Core or the new project format, it should be enough to simply add the package to your project.

Important Step when Adding Feature Files

When adding a new feature file, several lines are added to your project file including references to the feature file. This is currently necessary for backwards compatibility with older versions. You will need to remove these lines from the project file manually whenever you add a new feature:

To remove these lines:

  1. Right-click on your project in the Solution Explorer and select Edit XYZ.csproj (where “XYZ” is the name of your project).
  2. Delete all elements with references to feature files (see screenshot above).
  3. Build the project again.

Sample Projects

Update .NET Core versions of the example projects are located here:

https://github.com/techtalk/SpecFlow-Examples/tree/feature/netcore-examples/NETCore%20Examples

No Reports Available

Reports have been removed from the main code base and reports are not available in SpecFlow 3.0. For more details, please refer to this GitHub issue.

SpecFlow+ Runner Restrictions

  • When using SpecFlow+ Runner, AppDomain separation is unavailable for .NET Core.
  • There is currently no support for the SpecFlow+ Runner server, meaning that adaptive test scheduling is unavailable.
  • Reports are currently unavailable for .NET Core. Let us know if this is a showstopper for you.

VS Integration Breaking Changes – Affects ALL users!

The stable SpecFlow V3 has been released! Check out our latest blog post!

The upcoming SpecFlow 3 release will require an update to the Visual Studio extension for SpecFlow. Because the extension is normally updated automatically whenever a new version is released, this change has the potential to affect all users, not just those that upgrade to version 3! Please read the following information in detail.

What will break?

The new extension will not be compatible with versions of SpecFlow earlier than 2.3.2. If you are using an earlier version of SpecFlow, you should make sure that you have disabled automatic updates for the SpecFlow extension in Visual Studio. To do so:

  1. Select Tools | Extensions and Updates from the menu in Visual Studio.
  2. Enter “SpecFlow’ in the search field to restrict the entries in the list.
  3. Click on the “SpecFlow for Visual Studio” entry and disable the Automatically update this extension check box.
  4. This will prevent newer versions of the extension from being installed automatically. Once you are ready to upgrade to SpecFlow 3, you can enable this option again.

What limitations are there?

Because the Visual Studio extension can only be installed once per Visual Studio installation, you will not be able to mix SpecFlow 3 projects with projects that use a version of SpecFlow prior to 2.3.2.

How will the update be handled?

Our intention is to release a preview version of the Visual Studio extension that will not trigger automatic updates in Visual Studio for the duration of the preview period. If you want to try out the preview version of SpecFlow 3, you will need to add the feed to Visual Studio manually to install the new version of the extension. We will provide additional details on how to do this once the preview is available.

Once SpecFlow 3 has been officially released, we will update the live Visual Studio extension with the new version. This will cause your extension to automatically update if you have not disabled automatic updates (see above). From this point on, users of older versions of SpecFlow will need to download and install the compatible version of the Visual Studio extension manually and ensure that automatic updates are disabled.

I see a potential pitfall. What should I do?

If you see any potential pitfalls in this approach, please, let us know now! If you have suggestions for how to make this process easier, we would like to hear them! You can contact us at support@specflow.org.