SpecFlow Tips Archives - Gáspár Nagy on software https://gasparnagy.com/tag/specflow-tips/ coach, trainer and bdd addict, creator of SpecFlow; owner of Spec Solutions Thu, 16 Jan 2025 10:31:22 +0000 en-US hourly 1 https://wordpress.org/?v=6.9 57938217 SpecFlow end-of-life has been announced https://gasparnagy.com/2025/01/specflow-end-of-life-has-been-announced/ Thu, 16 Jan 2025 10:31:19 +0000 https://gasparnagy-com.lku.dkk.mybluehost.me/?p=2173 Originally posted at https://reqnroll.net/news/2025/01/specflow-end-of-life-has-been-announced/ In December 2024, Tricentis announced the end-of-life of the SpecFlow open source project. According to the announcement, SpecFlow reached its end-of-life on December 31, 2024. As of 1st January, the SpecFlow GitHub projects are deleted and the support section of the specflow.org website is disabled. “SpecFlow will no longer be available […]

The post SpecFlow end-of-life has been announced appeared first on Gáspár Nagy on software.

]]>
2173
SpecFlow without code-behind files and a big step towards .NET Core support https://gasparnagy.com/2017/04/specflow-without-code-behind-files/ https://gasparnagy.com/2017/04/specflow-without-code-behind-files/#comments Mon, 24 Apr 2017 09:20:38 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=1073 SpecFlow uses generated code-behind files for executing the scenarios. Not because we like code-behind files, but because this was the only way we could easily integrate Cucumber-style Behavior Driven Development to the .NET developer toolset. But after almost 8 years, can we get rid of the code-behind files finally? And how is it related to […]

The post SpecFlow without code-behind files and a big step towards .NET Core support appeared first on Gáspár Nagy on software.

]]>
https://gasparnagy.com/2017/04/specflow-without-code-behind-files/feed/ 4 1073
SpecFlow Tips: Baseclass or Context Injection https://gasparnagy.com/2017/02/specflow-tips-baseclass-or-context-injection/ https://gasparnagy.com/2017/02/specflow-tips-baseclass-or-context-injection/#comments Fri, 03 Feb 2017 13:17:45 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=985 We need to access different services and data from multiple step definition classes. Shall we use base classes or context injection for that? — This question has popped up at two of my clients, so I thought it would be worth discussing it also in a blog post. The Background Step definitions are global in […]

The post SpecFlow Tips: Baseclass or Context Injection appeared first on Gáspár Nagy on software.

]]>
https://gasparnagy.com/2017/02/specflow-tips-baseclass-or-context-injection/feed/ 1 985
SpecFlow tips: Customizing dependency injection with Autofac https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/ https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comments Thu, 18 Aug 2016 14:00:02 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860 SpecFlow creates and disposes the instances of your step definition classes automatically. It also allows injecting dependencies to these classes through a feature called context injection. This article shows how this injection can be configured to use the popular Autofac dependency injection framework. Before jumping to the solution, let me give some explanation on the […]

The post SpecFlow tips: Customizing dependency injection with Autofac appeared first on Gáspár Nagy on software.

]]>
https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/feed/ 8 860
SpecFlow Tips: Collect more information on error (part 2) https://gasparnagy.com/2016/05/specflow-tips-collect-more-information-on-error-part-2/ Fri, 13 May 2016 10:47:05 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=779 In the first part of this article I described why it is important to provide more information on errors and how you can collect useful artifacts (screenshots, log files, etc.) in an [AfterScenario] hook. In this part I would like to explain how to write more informative assertions. Writing informative good assertions is important for […]

The post SpecFlow Tips: Collect more information on error (part 2) appeared first on Gáspár Nagy on software.

]]>
779
SpecFlow Tips: Run only specific scenarios in TFS/VSTS build https://gasparnagy.com/2016/05/specflow-tips-run-only-specific-scenarios-in-tfsvsts-build/ Wed, 11 May 2016 08:33:29 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=777 Many teams who use SpecFlow setup their continuous integration environment with Microsoft Team Foundation Server (TFS) or its cloud based service, the Visual Studio Team Services (VSTS, fka VSO). TFS/VSTS has an improved build system, where it is much easier to setup and customize builds. Regardless of the fact, which unit test provider you use […]

The post SpecFlow Tips: Run only specific scenarios in TFS/VSTS build appeared first on Gáspár Nagy on software.

]]>
777
SpecFlow Tips: Collect more information on error (part 1) https://gasparnagy.com/2016/04/specflow-tips-collect-more-information-on-error-part-1/ Fri, 01 Apr 2016 10:01:06 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=754 When BDD scenarios are turned into executable automated tests, they usually automate the application together with its dependencies (e.g. end-to-end with browser automation or headless with controller-layer automation). This ensures that the application works as a whole, but unfortunately it also makes the analysis of a failing test harder. So many things can go wrong, […]

The post SpecFlow Tips: Collect more information on error (part 1) appeared first on Gáspár Nagy on software.

]]>
754
SpecFlow Tips: Put your hooks in order https://gasparnagy.com/2016/03/specflow-tips-put-your-hooks-in-order/ Tue, 01 Mar 2016 13:29:27 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=740 SpecFlow hooks (or events) are extension points where you can insert custom automation logic into the scenario execution before or after different sections, for example before any scenario execution. These can be used to perform custom preparation or cleanup logic, e.g. resetting the database. In bigger projects, you might need to have multiple hooks of […]

The post SpecFlow Tips: Put your hooks in order appeared first on Gáspár Nagy on software.

]]>
740
SpecFlow tips: Feature file backgrounds — like them or not https://gasparnagy.com/2016/02/specflow-tips-feature-file-backgrounds-like-them-or-not/ Thu, 11 Feb 2016 13:08:15 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=688 The format of the feature files used in Cucumber or SpecFlow is very simple. The format (or grammar), called Gherkin, was intentionally designed to be simple, so that the specification written in these files are kept simple and understandable. There are no loops or ifs. The only special structure you can make in a feature […]

The post SpecFlow tips: Feature file backgrounds — like them or not appeared first on Gáspár Nagy on software.

]]>
688
SpecFlow tips: How to upgrade your project to SpecFlow v2 https://gasparnagy.com/2016/01/specflow-tips-how-to-upgrade-your-project-to-specflow-v2/ Wed, 20 Jan 2016 11:49:38 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=652 As announced in December, we have published the pre-release version of SpecFlow v2. As hopefully the final version is also going to be released soon, it is good to be prepared how you can upgrade your existing projects to the new version. Update: The final v2 has been released on January 27, 2016. Check out […]

The post SpecFlow tips: How to upgrade your project to SpecFlow v2 appeared first on Gáspár Nagy on software.

]]>
652