A Scenario Outline
with Examples
table is used for data-driven testing.
@users
Feature: Users
@get @listUsers
Scenario Outline: ListUsers_FindByName_ReturnUser
Given The list of users is requested
When The name '<firstName>' '<lastName>' is searched
Then The user exists
Examples:
| firstName | lastName |
| Janet | Weaver |
| Rachel | Howell |
Create an env.json
file under the ReqRes.Specs
project.
{
"BASE_URL": "https://reqres.in",
"EMAIL": "youremail@domain.com",
"PASSWORD": "yoursecret"
}
The file only creates runtime env vars. It is automatically ignored by Git and no sensitive data is committed to the repository.
Configuration variables and secrets are now managed at CI-level.
github-actions.yml:
env:
BASE_URL: ${{ vars.BASE_URL }}
EMAIL: ${{ vars.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
The secret PASSWORD
is never exposed.
Note:
The same feature is present in all major devops products like Azure Pipelines, GitLab CI/CD, and Bitbucket Pipelines.