0

I am new to Specflow.While writing Feature File,I give 3 Boolean Statements in Given Condition.And in Then Part, I need to check the Result based on given conditions.

It is a basic AND Gate Sample:

 Input:  YES   YES    YES
 Output: YES           
 Input:  YES   YES    NO 
 Output: NO

1 Answer 1

3

I think you want to use Scenario Outlines.

Here is an example for it:

Scenario Outline: AND Gate   
Given I have the following input on my AND GATE  
 | Input 1  | Input 2  | Input 3  |  
 | <input1> | <input2> | <input3> |

Then I have '<output>' at the output

Examples: | input1 | input2 | input3 | output |
          | Yes    | Yes    | Yes    | Yes    | 
          | Yes    | Yes    | No     | No     |

The stuff in the <> brakets are parameters.
See the Gherkin reference for it here: https://cucumber.io/docs/reference#scenario-outline

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.