Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SpecFlow on .net core 2.0

I need to install nuget package SpecFlow 2.1.0 on .net core 2.0 project but i get issue.

enter image description here

like image 901
Vladimir Vidanovic Avatar asked Oct 25 '17 14:10

Vladimir Vidanovic


People also ask

Does SpecFlow support .NET 6?

Our team and the community pay close attention to make sure SpecFlow is always compatible with the most recent versions of the platforms we support. Support for Visual Studio 2022 and . NET 6 are here already!

What is the difference between cucumber and SpecFlow?

Cucumber is an application that reads Gherkin syntax plain text specification files and runs ruby files to execute those specifications. Specflow is a 'port' of cucumber for . net that also uses Gherkin syntax files but wires them up to . net code.

Is SpecFlow a tool or framework?

SpecFlow is a BDD framework for . NET which boosts your productivity by helping you with writing your feature files and automation code in your favorite IDE using C# and . NET methods.


2 Answers

Allow me suggest an alternative - Xunit.Gherkin.Quick. I wrote it when I discovered that SpecFlow is not compatible with .NET Core, and I needed to do Gherkin based BDD tests in .NET Core with Xunit.

Besides being compatible with .NET Core and regular .NET too (since it's a .NET Standard library), it works almost like specflow:

  • Supports feature files with Gherkin language in it.
  • gives you Given/When/Then etc. attributes to implement scenario steps.

What it does not do, compared to SpecFlow:

  • It does not automatically generate empty Given/When/Then etc. methods for you based on feature file. Instead, you need to derive from Feature base class and write scenario steps manually. (I think not a big deal to manually write a method signature with attribute on it)
  • It only supports Xunit and no other test frameworks.

Acceptable compromise in my opinion.

like image 133
Tengiz Avatar answered Oct 14 '22 09:10

Tengiz


From Their website:

.NET Core is not yet supported, but we are working on it.

like image 33
Eric Olsson Avatar answered Oct 14 '22 11:10

Eric Olsson