SpecFlow and PackageReference

By default, the packages used in SpecFlow projects are stored in packages.config. However the new Visual Studio projects instead use the PackageReference element to reference packages. When using the PackageReference element, generator plugins will not be found, and you will see errors similar to the following:

Unable to find plugin in the plugin search path: SpecRun. Please check http://go.specflow.org/doc-plugins for details.
#error TechTalk.SpecFlow.Generator

This is due to SpecFlow not searching for the package in the correct location. To ensure that the plugin is found, you need to specify the path explicitly in your app.config file.

To do so, enter the path to the appropriate path in the plugins element of your app.config file in this case, e.g.:

<plugins>
      <add name="SpecRun" path="%USERPROFILE%\.nuget\packages\specrun.specflow.2-3-0\1.7.0\lib\net45" />
</plugins>

IMPORTANT! You will need to manually update this path when upgrading to a newer version of the package, as the path contains the version number (e.g. “1.7.0” in the above example).

You can find a sample project using the new project format here. The relevant line in the app.config file is here.

Note: This requires SpecFlow 2.3.2 of higher. This step should not be necessary once SpecFlow 3 is released.

SpecFlow+ Runner and Excel 1.7 Released

SpecFlow+ 1.7 Runner

SpecFlow+ 1.7 Runner has been released. This version includes support for SpecFlow 2.3, as well as the following changes:

Fixes

  • runtests.cmd: uses msbuild.exe from path and not from %windir%\Microsoft.NET\Framework\v4.0.30319
  • Log entries are no longer written to the report file if you define the name of the report in your .runsettings file
  • VisualStudio.srProfile is used if it exists and the test run is started from within VisualStudio

 

SpecFlow+ 1.7 Excel

SpecFlow+ 1.7 Excel has been released. This version includes support for SpecFlow 2.2.1 and SpecFlow 2.3, as well as the following changes:

  • Use SpecFlow.Tools.MsBuild.Generation for SpecFlow 2.3 out of the box

SpecFlow 2.3 Released

SpecFlow 2.3 has been released with the following changes:

New features

Fixes

API Changes

Miscellaneous

A new NuGet package, “SpecFlow.Tools.MsBuild.Generation”, is available to easily enable the code-behind generation when building your project. The documentation will be updated soon.

SpecFlow+ Runner and Visual Studio 2017 15.6

Visual Studio 2017 15.5 Preview 2 introduced a new real time test discovery feature. This feature is live with 15.6.

When using VS 2017 15.6 with SpecFlow+ Runner, the Test Explorer will not display any tests in VS unless you enable Additionally discover tests from built assemblies after builds under Tools | Options | Test:

We are looking into how we can support real time test discovery with SpecFlow+ Runner. Until then, please make sure you enable this option in VS if you are using SpecFlow+ Runner with Visual Studio 2017 15.6.

SpecFlow Visual Studio Integration 2017.1.10 Released

A new update to the Visual Studio Integration for SpecFlow has been released for Visual Studio 2013, 2015 and 2017. This release contains the following changes:

  • Fix to run feature files in projects using the new project model introduces in VS 2017. More details here
  • Scenario outlines can now be executed from Visual Studio with SpecFlow+ Runner
  • Additional logging
  • Fix for running tests by right-clicking with Resharper

Thank you to all the contributors!

SpecFlow+ Runner 1.6.3 Released

SpecFlow+ Runner 1.6.3 has been released and is available to download from nuget.org.

This minor release fixes two bugs:

  • CommunicationObjectFaultedException thrown when using process separation in conjunction with DateTime
  • CommunicationObjectFaultedException with tests that take a long time to complete. This was caused by a time limit of 10 minutes for responses; the time limit has been extended to 24 hours.

SpecFlow+ Runner 1.6.2 Minor Release

SpecFlow+ Runner 1.6.2 is now available to download from NuGet.org. This release addresses two issues in SpecFlow+ Runner:

  • Workaround for issue 935, where the project name and projectId (GUID) are not automatically entered in your profile when installing the package.
    Note: You will still need to manually enter a GUID in your profile if you are using SpecFlow+ Server for adaptive testing. The projectId should be the GUID of the project (this is the <ProjectGuid> in your .csproj, although in theory you can enter any valid GUID here).
  • Thread.Current.Name again returns “Test Thread #<Number>” when executing tests in multiple threads

SpecFlow+ LivingDoc 0.1.9 Released

SpecFlow+ LivingDoc has been updated. If you are using the VSTS version, you will automatically receive this update. TFS users will need to download the extension from the marketplace.

This release introduces a number of UX improvements and additional features:

  • Click on Show source when viewing the documentation to switch to the source file in TFS/VSTS or on GitHub, where you can also edit the file.
  • You no longer need to specify a .csproj file to build the documentation. Instead, you can point to a folder. The documentation includes all features files in your folder and its child tree. This allows you to build a living documentation from feature files used by projects that are not developed in C#.
  • The version number is now displayed along with your license information when mousing over the licensee.

SpecFlow+ Runner 1.6.1 Released

SpecFlow+ Runner 1.6.1 is now available from NuGet. This minor release and adds support for the “Run Functional Tests” task in TFS/VSTS and fixes the following issues:

  • Project paths containing a hash character (‘#’) no longer cause a file not found exception
  • Tests are no longer duplicated in the Test Explorer in VS

Issue with SpecFlow+ Runner and Latest Visual Studio 2017 Version

Update: SpecFlow+ Runner 1.6.2 includes a fix for this issue. You now only need to enter a GUID if you are using the SpecFlow+ server (for adaptive test scheduling), as the GUID is used as the unique key for the test results.

 

We have discovered an issue that affects SpecFlow+ Runner with Visual Studio 2017. When adding the NuGet package to your project, a default profile is added to your project (default.srprofile). During the installation process, the projectName and projectId should be entered automatically in this profile.

When installing the packages with the latest version of Visual Studio 2017, the projectName and projectId are no longer filled in automatically. This results in your tests not being discovered, meaning they cannot be executed.

As a workaround, you can enter the projectName and projectId in your profile yourself. The projectName should be the name of the project you added the NuGet package to; the projectId should be the GUID of the project (this is the <ProjectGuid> in your .csproj, although in theory you can enter any valid GUID here).

An issue has already been opened, and you can track the status here.