Google News
logo
Cucumber - Interview Questions
Explain the purpose of keywords that are used for writing a scenario in Cucumber.
Given” keyword is used to specify a precondition for the scenario.

When” keyword is used to specify an operation to be performed.

Then” keyword is used to specify the expected result of a performed action.

And” keyword is used to join one or more statements together into a single statement.

But” It denotes a logical OR relationship between two propositions. OR can be combined with the GIVEN, WHEN, and THEN statements.
Advertisement