The Given-When-Then structure provides a consistent format for describing behavior:
Given: Sets up the initial context or preconditions
When: Describes the action or event being tested
Then: Defines the expected outcome or result
Example:
Scenario: User login with valid credentials
Given the user is on the login page
When the user enters valid username and password
Then the user should be redirected to the dashboard
This structure ensures scenarios follow logical flow and are easily understood by all stakeholders.