SpecFlow
SpecFlow copied to clipboard
Large number of feature files hangs the build with no indication of activity
When running SpecFlow scenarios in Visual Studio 2019, using a project with a large number of tests (900+ in our case), the build process appears to hang for a long time due to a significant number of file changes triggered by regenerating the code-behind files at build time. We've observed times of 10-20 minutes with no activity logged in the build output or the SpecFlow trace output, after which the requested scenarios run normally.
Please let me know if I can provide any further diagnostic information. I created this issue by request from Andreas Willich on this forum thread.
Did the latest version help anything?
Could you also add the information from the issue template here, so that we don't have to look into multiple locations for the information. Thanks!
How many feature files do you have and how evenly are the scenarios distributed between them.
SpecFlow Version: 3.3 Used Test Runner: Xunit 2.4.1 Project Format: Classic format using both packages.config and <PackageReference> tags (the solution has 160+ total projects of varying ages) .feature.cs file generated using: SpecFlow.Tools.MsBuild.Generation NuGet package Visual Studio Version: VS 2019 Enable SpecFlowSingleFileGenerator Custom Tool: Disabled Latest Visual Studio updates installed: Yes .NET Framework: Both >= .NET 4.5 and .NET Standard Test Execution Method: Visual Studio Test Explorer
Updating to SpecFlow 3.4.3 did not change the behavior.
We have about 1200 total feature files in our solution, almost 900 of which are in one project that contains reusable step files referenced by many other projects. (I'm advocating we refactor the step files into a separate project/dll to break this apart.) The tests are somewhat unevenly distributed. Most of our feature files have < 10 scenarios, because editing them starts to get sluggish beyond that point. A few at the high end may have 20 or more scenarios while a larger group of smaller ones have 2-5. Probably 10% of them use Scenario Outlines with anywhere from 5 to 20 examples defined.
We just finished a tool to generate big projects automatically. I will try it next week to create a similar-sized project and see if I can reproduce this performance behavior at compile time.
@SabotageAndi is there any update on this issue ?, this still open since 2020.
@SabotageAndi Are there any updates ? I am facing this issue still. Specflow Version: 3.9.74
Sorry @Kishan1892, but I left SpecFlow and Tricentis 2 months ago. I don't work on SpecFlow anymore. I can't help you here.