1
votes

SpecFlow Version: 2.2.1 Used Test Runner MSTest .feature.cs files are generated using SpecFlowSingleFileGenerator custom tool Visual Studio Version VS 2017 Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings Enabled Test Execution Method: Visual Studio Test Explorer & VSTS

In our solution when rebuilding after creating branch from vsts, always error comes for unnecessarily created .feature.cs files. We have lot of json files used in our project under 'TestFiles/' directory. In that in couple of sub folders the .feature.cs files are generated for each json test file. For example if I have a json file named 'test.json', the automatically generated file contains as 'test.feature.cs'. This solution used to work fine earlier. Not sure what happened now. After some changes when ever i rebuild I keep deleting the unnecessary feature.cs files and then continue the work. Even I remove those files and pushed to vsts, the vsts build fails with the same error.

It seems like somehow the specflow file generator wrongly identifies the .json test files as .feature files. I have no idea why this happens. What is the solution for this?

Deleted the auto generation property for each test file in .csproj file. But in vsts again those got regenerated. Not sure why.

1

1 Answers

0
votes

You can turn it off in tools -> options -> specflow -> enable SpecFlowSingleFileGenerator

enter image description here