Question

I have been experimenting with SpecFlow and I have liked what I've seen and tried out so far. However, I am concerned about one thing about SpecFlow, and it is the generated code for the test template for each feature file.

Although I have not ran into problems with the test template, I have concerns about problems that may arises from the generated code, since any changes to the generated code will be blown away if I were to rerun the specFlowSingleFileGenerator.

Has anyone encountered problems with the generated code and have to make changes and maintain?

Any suggestions that will help me avoid needing to make changes for the generated code?

Thanks - Eddy

Was it helpful?

Solution

The generated code can be easily regenerated. Delete the generated code file, and then right click on the feature in the "Solution Explorer" window. In the context menu which appears select the entry "Run Custom Tool", this will regenerate the code file.

You definitely should not modify the generated files, nor should you have any reason too.

I have had few problems with these files. Occasionally in work these files might get out of sync if multiple people are working on them, but regenerating them using the solution above usually alleviates any problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top