Writing Effective Test Scenarios
This guide provides best practices for creating test scenarios that the BlinqIO AI Test Engineer can efficiently process.
Overview
Create Clear Feature Files: The AI Test Engineer doesn’t know your application like a human would. Write your steps as if explaining to a new team member—clear and easy to follow.
Improve Accessibility: Ensure your website or application is accessible. This helps the AI perform better.
Focus on User Experience (UX): Well-designed applications with a smooth user experience give the AI better results.
Use Consistent Terminology: Stick to one term for specific things. For example, if your app uses "users," don’t switch between "customers" or "subscribers."
Scenario Guidelines
- Use
Given
andWhen
for actions (e.g., clicking, filling forms). - Use
Then
only for verification steps (e.g., checking if something appears on the page).
Use Comments
You can add comments to clarify steps or explain the scenario. This helps the AI understand your intentions.
In the example below, a comment tells the AI to create a private GitHub repository.
TIP
A comment placed before a scenario applies to all the steps that follow.
gherkin
Scenario Outline: Create a new repository
# Ensure the repository is private
Given I create a new repository named "<repo>" with description "<description>" and a README file
Examples:
| repo | description |
| {{string.alpha(10)}} | Sample description |