Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
426 views
in Technique[技术] by (71.8m points)

teamcity - Specflow Generateall verbose

I run 1000s of tests using specflow 2.0 and team city. Currently due to the amount of tests it often takes to the end of a run to realise that some tests failed to generate. I want to know if its possible to get the verbose output of the GenerateAll command for the generation of tests to save to a notepad file or interact with it directly with code in the project. This way we can run the output through some basic code to tell us how many tests failed to generate

Im not sure if its as simple as adding something to the command line or more complex so im not sure what additional info to provide.

question from:https://stackoverflow.com/questions/65847296/specflow-generateall-verbose

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use the MSBuild Generation to generate the code-behind files. With that, you get the errors as normal build errors.

If you are on SpecFlow >= 2.3, you can simply add the SpecFlow.Tools.MSBuild.Generation NuGet to your project and that should it be.

If you are on some earlier version, it is more complicated. So the best would be to update to the latest SpecFlow version.

Detailed documentation can be found here: https://docs.specflow.org/projects/specflow/en/latest/Tools/Generate-Tests-From-MsBuild.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...