运行specflow场景时在FeatureBackground()方法中获取错误

时间:2018-02-28 13:22:23

标签: c# .net specflow

我正在使用specflow运行自动化,但是当我尝试从VS运行特定方案时,我遇到了以下错误:: 结果StackTrace:
在Sample.Test.Automation.Stories.BookingFeature.FeatureBackground()中 C:\ Git \ em \ FunctionalAutomation \ AutomationTests \ NonUI \ Sample.Test.Automation.Stories \ Booking.feature:第9行

TestCleanup Stack Trace    在Sample.Test.Automation.Stories.BookingFeature.ScenarioTearDown() System.NullReferenceException:未将对象引用设置为对象的实例。 TestCleanup方法Sample.Test.Automation.Stories.BookingFeature.ScenarioTearDown抛出异常。 System.NullReferenceException:System.NullReferenceException:对象引用未设置为对象的实例..

我认为它与dll没有被加载或某些东西有关但我无法得到错误。 我尝试将try catch块放在.feature.cs文件中的FeatureBackground()方法中,但它不会在try catch块中抛出任何异常。

0 个答案:

没有答案