Issue with SpecFlow+ Runner and Latest Visual Studio 2017 Version

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.

Conflict with SpecFlow+ Runner and NUnit 3.7.1

NUnit 3.7.1 introduced changes that break NUnit tests executed with SpecFlow+ Runner when using NUnit’s Assert function. This results in an error similar to the following:

Object reference not set to an instance of an object.System.NullReferenceException: Object reference not set to an instance of an object. at NUnit.Framework.Assert.That[TActual](TActual actual, IResolveConstraint expression, String message, Object[] args)

This is a known issue. Until we are able to fix this, please stick to NUnit 3.6 if you are using SpecFlow+ Runner to execute your NUnit tests.

New SpecFlow+ Renewal Policy

A number of customers have contacted us in the past asking for option to renew their support period for SpecFlow+ so they can upgrade to a newer version. Until now, the only official option in this case was to purchase a new license at full cost.

This seems unfair on those users who want to keep up-to-date with the latest release and extend their support period each year. We have therefore decided to offer 1-year extensions to the SpecFlow+ support period for 50% of the cost of a new license. Extensions will be applied from the last day of the previous support period. For example, if your support period ends on 1 September 2017, the support period will be extended to 1 September 2018 (irrespective of the date on which you renew).

We are also giving all previous SpecFlow+ customers the option of renewing their SpecFlow+ licenses at the same price point, even if the upgrade period has already ended. In this case, the 1-year extension will begin from the date the renewal is purchased (instead of from the end of your last support period). This offer is only valid until the end of August 2017. If you are an existing SpecFlow+ customer and want to renew your license and support period, please visit this page and provide us with as much information on your licenses as possible. We will verify that you are a past customer and send you a payment link. If you have any questions, you can also contact us directly at support [at] specflow.org.

Podcast with SpecFlow creator Gaspar Nagy

SpecFlow creator Gaspar Nagy recently joined Aslak Hellesoy, Matt Wynne and Arti Mathanda for March’s Cucumber Podcast.

In the podcast, Gaspar talks about the origins of SpecFlow and how working on SpecFlow changed his life. He also sheds some light on the future of SpecFlow and his own plans, including teasing us with the prospect of his own book on the subject. As well as talking about SpecFlow and Cucumber, the panel also discuss some general topics, such as the role of QA in modern development teams. And last but not least, you will also learn how to pronounce Gaspar’s name like a true Hungarian.

New SpecFlow+ Sample Projects Available

We’ve added a number of new samples to the SpecFlow+ sample repository on GitHub:

  • WindowsAppDriver: Demonstrates using the WindowsAppDriver with SpecFlow+ and the Windows calculator.
  • CustomDeploymentSteps: Sample project based on the previous WindowsAppDriver project that demonstrates custom deployment steps.
  • ExcelExample: A relatively simple calculator project using SpecFlow+ Excel. Different operations (add/subtract/divide/multiply) are specified using a either a standard feature file, an Excel file, or a combination of a standard feature file and example data in an Excel file.
  • FilterExample: A sample project demonstrating how to use filters to only run a subset of tests.
  • MultipleReports: A sample project showing how to configure SpecFlow+ Runner to output multiple reports using custom templates.
  • TestThreadIsolation: A sample project showing the effects of different test thread isolation configurations for multithreaded testing

SpecFlow Visual Studio 2017 Sim Ship Announcement

Visual Studio 2017’s official release is just around the corner, and TechTalk and SpecFlow have teamed up with Microsoft as a Sim Ship partner. Microsoft’s Sim Ship (simultaneous shipment) program has been going strong for years, and gives selected Visual Studio partners the opportunity to access migration support, documentation and the latest builds of Visual Studio. This gives partners a chance to upgrade their Visual Studio extensions for compatibility with the new version in time to be shipped with the official release of Visual Studio.

This means that you will be able to upgrade to VS 2017 immediately upon release and continue using SpecFlow and SpecFlow+. We updated the SpecFlow VS integration in January to introduce support for VS 2017, and the latest version is available from the Visual Studio Marketplace. Note that this version does not yet fully support .NET Core and .Net Standard projects in VS 2017. If you notice any oddities with SpecFlow in VS 2017, let us know!

Video: Traits in SpecFlow

Sophie Keiblinger from TechTalk has taken time out from her testing duties to share a couple of insights into how she and her team use traits (tags) in SpecFlow. This ranges from keeping track of the user stories associated with changes to scenarios, using traits to communicate the status of tests with other team members and managing which tests should be executed for different builds.

Website Redesign

We’re sure you’ve already noticed that the SpecFlow website has changed in appearance. We’ve tried to tidy things up a little and have made a few changes to the site, in particular the News section, which now has categories and filters.

To make the transition as painless as possible, we have retained most of the pages and their URLs, so most of your bookmarks should still work. That said, we did some spring cleaning: some ancient pages are gone and we consolidated a number of pages on the new Documentation landing page. All links to SpecFlow-related resources (documentation, tutorials, videos, books, sample projects etc.) are now in one place. The main menu has also changed a bit as a result.

If you spot anything that seems strange or have feedback/suggestions, let us know in the comments below.

 

Anatomy of a Gherkin

Dirk Rombauts from Pickles Pro has written an in-depth guide to the Gherkin syntax called Anatomy of a Gherkin. It’s a great introduction to the Gherkin syntax. As well as tackling the various Gherkin keywords, Dirk has drawn on his extensive experience to include practical tips and potential pitfalls, as well as explaining how to write Gherkin in languages other than English.

Dependency Injection with Autofac and Unity

Gaspar Nagy recently released SpecFlow.Autofac, a plugin that allows you to use the popular Autofac dependency injection framework with SpecFlow. You can read more about it on Gaspar’s blog as well as download the project and use it as a starting point for your own.

Paul Hatcher did just that and has published a version with support for Microsoft’s Unity 4.0.1 or higher. More information can be found on the project page on GitHub.