Which syntax correctly represents a simple acceptance test scenario in Gherkin language?
easy📝 Conceptual Q3 of 15
Testing Fundamentals - Testing Types and Levels
Which syntax correctly represents a simple acceptance test scenario in Gherkin language?
AIf the user logs in\nThen the form is saved\nElse show error
BGiven the user is logged in\nWhen the user clicks 'Submit'\nThen the form is saved
CStart user login\nClick submit\nSave form
DUser logs in, submits form, form saved
Step-by-Step Solution
Solution:
Step 1: Identify correct Gherkin syntax
Gherkin uses Given, When, Then keywords to describe acceptance test steps clearly.
Step 2: Compare options to Gherkin format
Given the user is logged in\nWhen the user clicks 'Submit'\nThen the form is saved uses correct keywords and structure. Others do not follow Gherkin syntax properly.
Final Answer:
Given the user is logged in\nWhen the user clicks 'Submit'\nThen the form is saved -> Option B
Quick Check:
Gherkin syntax = Given-When-Then [OK]
Quick Trick:Use Given-When-Then for acceptance test steps [OK]
Common Mistakes:
Using if-else instead of Given-When-Then
Writing steps as plain sentences without keywords
Mixing scenario steps in one line
Master "Testing Types and Levels" in Testing Fundamentals
9 interactive learning modes - each teaches the same concept differently