SpecFlow Manual Testing
Sometimes there are scenarios that can only be tested manually. Maybe you are testing colors or placement of a picture or some other important feature that only human eyes can assert as right or wrong. When I have a manual test definition in my automated test framework I want to tell the framework to ignore it, but still report it so we don’t lose sight of it. I am building features into my test framework to handle ignoring manual testing, but I found this code below that does it easily in SpecFlow.
[Binding, Scope(Tag = “Manual”)]
public class ManualSteps
{
[Given(“.*”), When(“.*”), Then(“.*”)]
public void EmptyStep()
{
}
[Given(“.*”), When(“.*”), Then(“.*”)]
public void EmptyStep(string multiLineStringParam)
{
}
[Given(“.*”), When(“.*”), Then(“.*”)]
public void EmptyStep(Table tableParam)
{
}
}
From https://github.com/techtalk/SpecFlow/wiki/Scoped-Bindings
With this any scenario tagged with @Manual will be ignored, but they will still be reported in the test report. Sweet.
One comment