How to diagnose “TestFixtureSetUp Failed”

前端 未结 11 1104
感动是毒
感动是毒 2021-02-06 21:46

We use TeamCity as our CI server, and I\'ve just started seeing \"TestFixtureSetUp Failed\" in the test failure window.

Any idea how I go about debugging th

11条回答
  •  伪装坚强ぢ
    2021-02-06 22:27

    If you are using SpecFlow and C# in Visual Studio, look at the auto-generated .feature.cs file after the test fails. On the public partial class Feature line, you should see a symbol which when hovered over will show the reason that the NUnit fixture setup failed. In my case, it was that some of my BeforeFeature methods in my TestHooks class were not static. All BeforeTestRun, AfterTestRun, BeforeFeature, and AfterFeature methods need to be static.

提交回复
热议问题