Skip to main content

Optional ignore

Answered

Comments

2 comments

  • Andreas Willich

    You need at least SpecFlow 3.1 to do it.

    Then you can do it in this way:

       [Binding]
        public sealed class StepDefinitions
        {
            private readonly IUnitTestRuntimeProvider _unitTestRuntimeProvider;
    
            public CalculatorStepDefinitions(IUnitTestRuntimeProvider unitTestRuntimeProvider)
            {
                _unitTestRuntimeProvider = unitTestRuntimeProvider;
            }
    
            [When("your binding")]
            public void YourBindingMethod()
            {
                _unitTestRuntimeProvider.TestIgnore("This scenario is always skipped");
            }
        }

    0

Please sign in to leave a comment.

Powered by Zendesk