猿问

跳过功能-SpecFlow C#

我希望使用[BeforeFeature] SpecFlow Hook拦截测试,并忽略整个功能文件。


private static string FeatureName = FeatureContext.Current.FeatureInfo.Title;


[BeforeFeature]

public static void BeforeFeature()

{

    Console.WriteLine("Before feature");


    if (TestFilter.ShouldBeIgnored(FeatureName))

    {

        // Ignore Feature if it matches TestFilter Requirements

    }

}


收到一只叮咚
浏览 209回答 2
2回答

凤凰求蛊

您是否关注过@ignore标签?您可以跳过功能或方案。 关联
随时随地看视频慕课网APP
我要回答