Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...