Maestro Templates
Example
Below is an example test for Jira ticket QA-263.
appId: ${APP_ID}
name: QA-263 - Sanity - Deposit Debit Card
tags:
- sanity # eg. sanity / feature / domain (eg. racing / sports / accounts)
- deposit # eg. action you're testing
---
- runFlow:
file: ../../flows/launch.yaml
env:
SETUP: setupCreditCardDepositTest ## located within the feature's test-setup.ts file
ACCOUNT_TAG: DEPOSIT_CARD_USER ## fetches the user from fixtures/constants/users/<brand>.<platform>.json
The above example uses the launch.yaml
flow and does the following:
- Takes the App ID environment variable and launches the app. APP_ID is automatically assigned based on the brand you ran the test with.
- Runs the launch flow with your setup function.
- Logs the test user in that has the tag
DEPOSIT_CARD_USER
in thefixtures/constants/users/<brand>.<platform>.json
file.
Test Template
In order to keep our test suite consistent we have a starting template that you can use.
info
- Split your test into the individual steps listed on your ticket.
- Use whitespace effectively to separate your steps and make your test readable.
appId: ${APP_ID}
name: <jira ticket> - <test domain> - <test name>
tags:
- <tag1>
- <tag2>
---
- runFlow:
file: ../../flows/launch.yaml
env:
SETUP: '<setup-test>'
ACCOUNT_TAG: '<account tag>'
Flow Template
In order to keep our flows consistent we have a starting template that you can use.
appId: ${APP_ID}
name: <flow domain> - <action>
---
# insert flow here