Maestro reporter
Install qualflare-maestro from Homebrew, run maestro test through it and upload the steps and screenshots of each flow with the Qualflare CLI.
Last updated
qualflare-maestro is the Qualflare reporter for Maestro 2.6.0 or later: it runs maestro test and writes a step for every command, with screenshots and tags, to qualflare-results, and qf <identifier> collect uploads the folder as one launch.
| Fact | Detail |
|---|---|
| Package | qualflare-maestro, the Homebrew cask qualflare/tap/qualflare-maestro |
| Works with | Maestro 2.6.0 or later |
| qf | qf ≥ 0.1.24 (requires qf 0.1.24 or later) for screenshots |
| License | Apache-2.0 |
| Source | Qualflare/qualflare-maestro on GitHub |
| Without the reporter | --format maestro with Maestro's JUnit XML |
Before you begin
- The Qualflare CLI,
qf: Install the CLI. - A saved login:
qf login <identifier>with a project access token whose creator still holds the project role that uploads need Editor+ · project (requires the Editor role or higher in the project) (Authenticate with qf login). - The Identifier of the environment the results belong to (Environments).
Install
brew install qualflare/tap/qualflare-maestro
# or
go install github.com/Qualflare/qualflare-maestro/cmd/qualflare-maestro@latestBinaries for macOS, Linux and Windows are on the releases page.
Configure
Reporter flags go before --, and Maestro's after it:
qualflare-maestro -environment staging -- maestro test --env USER=ci .maestro/| Option | Type | Default | Required | Description |
|---|---|---|---|---|
-environment | string | development | No | Variable |
-platform | string | detected | No |
|
-output-dir | string | qualflare-results | No | Variable |
-shard-index | number | none | No | Which shard produced these flows. Variable |
QUALFLARE_MAESTRO_BIN | string | maestro on PATH | No | The Maestro binary to run. |
The reporter sets --format, --output, --debug-output and --flatten-debug-output itself; passing one exits with code 2.
Every reporter shares the other settings: see Reporter configuration.
Set -environment to the environment's Identifier: a name such as Staging fails the upload with HTTP 400 (Environment).
Run and upload
qualflare-maestro -- maestro test .maestro/
qf <identifier> collect ./qualflare-resultsqualflare-maestro .maestro/ is short for the first line. It returns Maestro's exit code, so it replaces maestro test in CI.
Run in CI
- name: Run Maestro flows
run: qualflare-maestro -- maestro test .maestro/
- name: Upload results to Qualflare
if: ${{ !cancelled() }}
env:
QF_TOKEN: ${{ secrets.QF_TOKEN }}
QF_BRANCH: ${{ github.head_ref || github.ref_name }}
QF_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
npm install -g @qualflare/cli
qf login ci --force
qf ci collect ./qualflare-resultsif: ${{ !cancelled() }} uploads the results when tests fail, and QF_BRANCH and QF_COMMIT record a pull request's own branch and commit (Pull request branches). For GitLab CI/CD, Jenkins and Azure Pipelines, see Run the upload when tests fail.
Sharding and retries
Every shard must share one run ID (-run-id, detected from the CI run on GitHub Actions, GitLab CI, CircleCI and Jenkins); set -shard-index per shard. See Merge sharded CI jobs into one launch.
What gets uploaded
- A test per flow, named by its path and name.
- A step per command, named from the YAML, nested under
runFlow,repeatandretryon Maestro 2.10 or later. - Screenshots of failed steps, and of warned ones on Maestro 2.10 or later.
- Durations from the commands.
- The flow's
tags. - When Maestro exits without results, an error test named
[unattributed failure]with the end of Maestro's log.
Flows set metadata in properties:
appId: com.example.app
name: Checkout with a saved card
properties:
qualflare.priority: high
qualflare.description: Pays with the first saved card and checks the receipt.
qualflare.link.issue: https://example.atlassian.net/browse/PAY-142
qualflare.link.custom.runbook: https://wiki.example.com/payments
qualflare.label.team: paymentsqualflare.priority:low,medium,highorcritical.qualflare.description: the description.qualflare.link.<issue|tms|custom>[.<name>]: a link, optionally named.qualflare.label.<name>: a label.- Anything else: a test property.
Step names keep ${PASSWORD}-style placeholders, and values passed with --env or MAESTRO_* variables are replaced by ${NAME} in error messages.
qf doesn't read the branch, commit, language or milestone from the report: set them on the upload (Branch, commit, language and milestone).
Troubleshooting
- Exit
2: a usage error, or a flag the reporter sets. - Exit
127:maestrowasn't found; setQUALFLARE_MAESTRO_BIN. - Exit
1: Maestro couldn't start, or the report couldn't be written. - An
[unattributed failure]test: invalid YAML, or no device. environment "Staging" does not exist in this project: use the environment's Identifier, or pass--environmenton the upload (Environment).- Screenshots can't be downloaded:
qfis older than 0.1.24. Upgrade qf.
Related
Espresso reporter
Add com.qualflare:qualflare-espresso to androidTestImplementation, register its run listener and upload the reports Gradle pulls with the Qualflare CLI.
Flutter reporter
Upload Flutter test results from flutter test's JSON file with the Qualflare CLI, and add labels, steps and screenshots with qualflare_flutter.