Ответ
Feature: User Login
As a registered user
I want to log in to the system
So that I can access my account
Scenario: Successful login with valid credentials
Given I am on the login page
When I enter "testuser@example.com" in the email field
And I enter "P@ssw0rd123" in the password field
And I click the "Login" button
Then I should be redirected to the dashboard
And I should see "Welcome, testuser" message
Scenario: Failed login with invalid password
Given I am on the login page
When I enter "testuser@example.com" in the email field
And I enter "wrongpass" in the password field
And I click the "Login" button
Then I should see "Invalid credentials" error message
And I should remain on the login page
Это пример тестового сценария в формате Gherkin, который включает:
- Описание фичи (Feature)
- Два сценария с четкими шагами (Given/When/Then)
- Ожидаемые результаты
- Примеры валидных и невалидных данных