Skip to content
  1. We help small teams achieve big things.
  2. Our Technical Fellow just became a Microsoft MVP!
  3. We run the Azure Weekly newsletter.
  4. We just won 2 awards.
  5. We just published Programming C# 8.0 book.
  6. We run the Power BI Weekly newsletter.
  7. Our NDC London 2020 talk is now available online!
  8. We are school STEM ambassadors.
Howard van Rooijen By Howard van Rooijen Co-Founder
SpecFlow Extensions for Azure Storage Emulator

In most cases, when writing an integration specifications against Azure Storage, you want to use the real thing rather than the Storage Emulator as the performance profile and behaviours are noticeably different. One exception is if you've hosted your code in a public repo; in this case you really don't want to commit your real Azure Storage connection details into that repo to allow your integration tests to run on your build server. So it makes more sense to try and make your spec run against the emulator.

Mike Larah wrote a neat little extension for SpecFlow that allows you to specify a @storage_emulator tag against your scenario and this will seek out the Storage Emulator and invoke it, if it's not already running. The example below shows how simple it is to use:

We've released it as a NuGet Package and is available by using the following command:

Install-Package Endjin.SpecFlow.Azure.Storage

The source code is available on GitHub. We also provide NuGet packages which contain a series of useful steps and transformations:

Install-Package Endjin.SpecFlow

We also provide extensions for our composition framework:

Install-Package Endjin.SpecFlow.Composition

And for hosting static files:

Install-Package Endjin.SpecFlow.Owin.Hosting

@HowardvRooijen

Sign up to Azure Weekly to receive Azure related news and articles direct to your inbox every Sunday, or follow @azureweekly on Twitter.

Howard van Rooijen

Co-Founder

Howard van Rooijen

Howard spent 10 years as a technology consultant helping some of the UK's best known organisations work smarter, before founding endjin in 2010. He's a Microsoft ScaleUp Mentor, and a Microsoft Azure MVP, and helps small teams achieve big things using data, AI and Microsoft Azure.