QA Guide
This guide is specifically designed for QA teams and non-technical users who want to write automated tests without programming knowledge.
Understanding Test Files
TestFlowKit uses .feature files written in Gherkin — a plain English syntax that reads like natural language.
The Structure of a Test File
Feature: Login System
As a user
I want to log into my account
So that I can access my dashboard
Scenario: Successful login
Given the user goes to the "login" page
When the user enters "john@example.com" into the "email" field
And the user enters "mypassword" into the "password" field
And the user clicks the "login" button
Then the page title should be "Dashboard"
Key Components
| Component | Purpose | Example |
|---|---|---|
| Feature | Describes what you're testing | Feature: Login System |
| Scenario | A specific test case | Scenario: Successful login |
| Given | Starting point/setup | Given the user goes to the "login" page |
| When | Actions the user takes | When the user clicks the "submit" button |
| Then | Expected results | Then the page title should be "Dashboard" |
| And/But | Additional steps | And the "welcome" should be visible |
Writing Your First Test
Step 1: Identify What to Test
Before writing a test, answer these questions:
- What feature am I testing?
- What is the user trying to accomplish?
- What should happen when it works correctly?
Step 2: Write in Plain English
Write out the test steps as if explaining to a colleague:
"First, the user goes to the login page. Then they enter their email and password. After clicking the login button, they should see their dashboard."
Step 3: Convert to Gherkin
Transform your description into Gherkin syntax:
Scenario: User logs in successfully
Given the user goes to the "login" page
When the user enters "john@example.com" into the "email" field
And the user enters "mypassword" into the "password" field
And the user clicks the "login" button
Then the page title should be "Dashboard"
Common Test Patterns
Testing Navigation
Scenario: Navigate to different pages
Given the user goes to the "home" page
When the user clicks the "about_link" link
Then the current URL should contain "/about"
Testing Forms
Scenario: Submit a contact form
Given the user goes to the "contact" page
When the user enters "Jane Doe" into the "name" field
And the user enters "jane@example.com" into the "email" field
And the user enters "Hello, I have a question" into the "message" field
And the user clicks the "submit" button
Then the "success message" should be visible
And the "success message" should contain "Thank you"
Testing Visibility
Scenario: Check element visibility
Given the user goes to the "dashboard" page
Then the sidebar should be visible
And the user menu should be visible
But the login button should not be visible
Testing Text Content
Scenario: Verify page content
Given the user goes to the "about" page
Then the "page title" should contain "About Us"
And the description should contain "our mission"
Tips for QA Teams
1. Use Descriptive Scenario Names
Good:
Scenario: User receives error message when login fails with wrong password
Bad:
Scenario: Test login error
2. One Thing Per Scenario
Each scenario should test one specific behavior. If your scenario has too many "And" steps, consider splitting it.
3. Use Tags for Organization
@smoke @login
Scenario: Quick login verification
Given the user goes to the "login" page
Then the "login form" should be visible
@regression @login
Scenario: Full login flow with validation
# ... more detailed steps
4. Reuse with Macros
If you find yourself writing the same steps repeatedly, ask your development team about creating macros.
Working with Developers
Your development team will help you with:
- Setting up the configuration — Defining element selectors and page URLs
- Creating macros — Building reusable test patterns
- Troubleshooting — Fixing failing tests due to application changes
When a test fails, provide:
- The scenario name and feature file
- The error message
- What you expected to happen
Next Steps
- Step Definitions — Browse all available test sentences
- Variables — Learn about dynamic test data
- Troubleshooting — Solutions to common problems