Skip to content

Early Adopter Offer:Get 40% off Core & Scale for your first year with code EARLYQFView pricing

Flutter test reporting

Flutter results reach Qualflare with no package at all: qf <identifier> collect reads the JSON that flutter test already writes, for widget tests on the host and integration_test runs on Android and iOS. The optional qualflare_flutter package adds what only the test author knows — labels, steps and screenshots. This guide covers both, a CI pattern, the limits, and the hosted, historical analysis that sits on top.

Flutter’s own JSON test output, explained

flutter test can write a machine-readable record of the run alongside its normal console output. One flag, and the file is there when the run ends:

# Flutter's own JSON test output, written to a file.
# The console output stays as it is.
flutter test --file-reporter json:flutter-results.json

--file-reporter json: keeps the console output you already read, which is why it is the one to use in CI. If your pipeline already captures --machine output, that works too. Either way the Qualflare CLI reads the file as it is — there is nothing to add to pubspec.yaml to get results in.

What arrives without the package

  • Statuses and durations. Passed, failed, error and skipped, each with how long it took, and the test’s own file and line.
  • The real reason a widget test failed. When an expect fails, Flutter itself reports only “Test failed. See exception logs above.” Qualflare shows the test as failed with the actual assertion message and stack trace.
  • Retries, attempt by attempt. A retried test arrives with the history of each attempt, so a test that failed and then passed is flagged as flaky rather than counted as a plain pass.
  • Output. What the test printed with print stays attached to it.
  • Compilation and setup errors. A test file that fails to compile, or a setUpAll that throws, produces a visible error record. Individual tests prevented from starting may have no events and be absent from the report; that error record is not a complete inventory of unrun tests.

Integration tests on Android and iOS

After installing the CLI and saving a login, integration_test results from an Android emulator or iOS simulator upload in the same format as host tests. Use flutter devices to choose a device. Flutter’s JSON does not identify its platform, so pass --platform android or --platform ios to the CLI:

# Choose an Android emulator or iOS simulator from flutter devices.
flutter test integration_test -d <device> --file-reporter json:flutter-results.json

# After qf login myapp; use --platform ios for an iOS run.
qf myapp collect flutter-results.json --platform android

Send Flutter results to Qualflare

Install the CLI with Node.js/npm available, then sign in locally. Reading Flutter’s own JSON needs Qualflare CLI 0.2.0 or later; install a current release using the CLI installation guide:

npm install -g @qualflare/cli
qf login myapp

qf login myapp opens the browser so you can choose a project and approve access. Uploading needs the Editor project role or higher. The name myapp is a local identifier for that saved login, not the remote project’s name. Then run the suite and collect its report:

# Flutter's own JSON test output, written to a file.
# The console output stays as it is.
flutter test --file-reporter json:flutter-results.json
qf myapp collect flutter-results.json

The general shape is qf <identifier> collect [files...] [flags]. Useful flags: --environment, --branch, --commit, and --dry-run to preview the report without uploading; a dry run does not verify server access. In GitHub Actions, store a project access token as the QF_TOKEN secret and log in within every uploading job. The upload step below still runs after test failure unless the job is cancelled; the test step keeps its failure status. The branch and commit variables record the pull request’s own source rather than GitHub’s synthetic merge:

# GitHub Actions steps after checkout, Flutter setup and flutter pub get.
# Node.js/npm must be available for the CLI installation.
- name: Run Flutter tests
  run: flutter test --file-reporter json:flutter-results.json

- 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 flutter-results.json

collect uses the saved login, not QF_TOKEN directly. See CI authentication. The run-and-upload pattern applies to other providers, but the failure-handling syntax differs: GitLab CI/CD, Bitbucket Pipelines and Jenkins.

One successful collect call creates one launch. To combine parallel jobs from the same run, gather their reports in a final job and upload once; separate uploads create separate launches. See sharded runs. Keep Android and iOS uploads separate when they need different --platform values: that flag applies to the whole launch.

Adding labels, steps and screenshots with qualflare_flutter

The optional qualflare_flutter package is a dev dependency requiring Flutter 3.24 or later and Dart 3.5 or later. Reading its data needs Qualflare CLI 0.3.0 or later:

flutter pub add --dev qualflare_flutter

From inside a test you can add labels, links (issue, tms or custom), tags, a priority, named steps that nest, attachments and screenshots. The names match the qualflare.* API of Qualflare’s JavaScript reporters:

import 'package:qualflare_flutter/qualflare_flutter.dart';

testWidgets('pays with a card', (tester) async {
  qualflare.label('owner', 'mobile-team');
  qualflare.link('https://tracker/QF-1', type: 'issue', name: 'QF-1');
  qualflare.tags(['checkout', 'smoke']);
  qualflare.priority('high');
  await qualflare.step('fill in the card', () async {
    // steps nest
  });
  await qualflare.screenshot(tester, 'checkout');
});

// Attempts failure.png when the test body throws, then preserves the failure.
qualflareTestWidgets('shows the receipt', (tester) async {
  // ...
});

qualflare.screenshot(tester, 'name') works in widget tests on the host and in integration_test runs on devices. qualflareTestWidgets attempts to attach failure.png when the test body throws, such as a failed expect, then rethrows the failure. The image shows the last painted screen. Errors Flutter catches itself, including build or layout failures reported after the body returns, do not trigger this capture. A failed capture records a warning, and attachment limits still apply.

Default screenshots render Flutter’s root layer. These options add real fonts for host tests or native platform-view capture for supported device tests:

// Host widget tests draw text in Flutter's test font.
// Load real fonts once per test file (opt-in):
setUpAll(() => qualflare.loadFonts());

// In an Android/iOS test using IntegrationTestWidgetsFlutterBinding:
await qualflare.screenshot(tester, 'map', native: true);

native: true uses native capture only with an IntegrationTestWidgetsFlutterBinding on Android or iOS. It includes platform views such as maps and web views, not a guarantee of all system UI. Elsewhere it falls back to the Flutter root layer. The first native capture on Android converts the Flutter surface to an image view and pumps a frame, changing rendering for the rest of that process. See the package’s screenshot guidance.

qualflare.loadFonts() is opt-in. Call it after a test binding exists, such as from setUpAll. It changes text metrics for the test file, so review affected layout and golden expectations; it does nothing in an integration-test run where real fonts are already used.

How it works. The package writes its data into the same flutter test results file. Flutter has no reporter plug-in API, and integration tests run on the device, so the results file is the one channel that works for both. The two commands stay the same.

Limitations

  • Package attachment caps. Attachments and screenshots are capped at 5 MiB each and 20 MiB per test across all attempts, so retry screenshots share that budget. Over-limit attachments are dropped with a warning rather than failing the test.
  • Tighter inline upload limits. The CLI uploads PNG, JPEG and GIF images separately. Other attachment types stay inline and are dropped above 1 MiB each or when they would take an input file’s inline attachments past 8 MiB. A 2 MiB JSON attachment can therefore pass the package cap but be dropped by the CLI. Check warnings in the test output and the overall upload-size limits; the CLI may remove more inline attachments to fit the request.
  • No package support for Flutter web. qualflare_flutter uses dart:io and does not support flutter test --platform chrome. This guide’s supported scope is host widget tests and Android/iOS integration tests.
  • Maestro still has a place. For black-box flows that drive the built app from outside, Maestro is still useful, and its results land in the same project.

See a real Flutter project

The package’s example suite includes host widget tests, an Android emulator and an iOS simulator in CI. Main-branch pushes upload device runs with the deliberately failing demo excluded to a public Qualflare project. See the source and CI workflow for the full examples; the public launches are not evidence that every failure produces a screenshot.

What you get on top of Flutter’s own output

  • History & trends. Each successful collection creates a launch, so uploaded results can be compared across runs and branches rather than inspected one console log at a time.
  • Flaky tests flagged from retries. A test that failed and then passed arrives marked flaky with each attempt kept, instead of disappearing into a green build.
  • AI failure clustering. Qualflare groups similar uploaded failures in the background when the workspace’s plan, active subscription, project AI setting and remaining allowances permit it. A cluster stays pending until it holds five failures; its generated root-cause and fix suggestions need human verification. Cluster capacity and monthly AI report analyses can stop new grouping without removing the test results. See failure-clustering limits.
  • Launch summaries. Launch analysis is a separate background job, not a promise of an immediate cluster diagnosis. It can be disabled, unavailable, skipped at the allowance limit or fail. All-passed and no-tests launches receive fixed summaries without a model call. Check project AI settings and usage.
  • One place for the whole mobile stack. Flutter results sit next to Espresso, XCTest and Maestro results in the same project.

Bring your Flutter results into one place

Start free, save a CLI login and upload with qf <identifier> collect flutter-results.json. Inspect the launch’s results and any analysis available under your project settings and workspace limits.

Get Started Free

Testing the native layers too? See our guides to Espresso reporting for Android, XCTest reporting for iOS, and Maestro reporting for cross-platform E2E flows, or the full list of supported frameworks. For the bigger picture, read fixing flaky mobile tests or the complete guide to mobile test management. Weighing tools? See how Qualflare compares to other test management platforms, or browse all framework reporting guides.

Frequently asked questions

Do I need Maestro to report Flutter tests?

No. Install the Qualflare CLI and sign in with qf login myapp, then run flutter test --file-reporter json:flutter-results.json and qf myapp collect flutter-results.json. myapp is the local name for the saved login, not a project name. For device runs, select the device and pass --platform android or --platform ios when uploading. Maestro remains an option for black-box flows that drive the built app from outside.

Do I need a Flutter package to send results to Qualflare?

No. The Qualflare CLI (0.2.0 or later) reads the JSON that flutter test already writes: statuses, durations, the file and line of each test, print output, the real assertion message for a failed widget test, and per-attempt retry history. The optional qualflare_flutter package adds what only the test author knows — labels, links, tags, priority, named steps, attachments and screenshots. Reading its data needs qf 0.3.0 or later.

Why does a failed widget test show the real assertion message?

When an expect fails in a widget test, Flutter’s error event says “Test failed. See exception logs above.” The assertion message and stack trace are in the test output. The Qualflare CLI recovers them, so that assertion failure arrives as failed with its message and stack. Other exceptions can arrive as error.

Does it work for integration_test on Android and iOS?

Yes. Android emulator and iOS simulator runs use the same report format as host tests. Select a device with flutter test integration_test -d <device>, write the JSON report, and pass --platform android or --platform ios to qf <identifier> collect. With an IntegrationTestWidgetsFlutterBinding on Android or iOS, native: true captures platform views such as maps and web views; it does not guarantee capture of all system UI. Elsewhere, native: true falls back to the Flutter root layer.

Is Flutter web supported?

The qualflare_flutter package does not support flutter test --platform chrome because it uses dart:io. This guide covers host widget tests and Android/iOS integration_test runs, not Flutter web.

Does Qualflare run my Flutter tests?

No. Qualflare is a results-management and observability layer, not a device cloud. Your suite runs wherever it already runs — locally, in CI, on an emulator or a simulator — and Qualflare reads the results file it writes.

Recent updates

All updates on the Qualflare changelog

Setup and limits reviewed against the Qualflare CLI (docs.qualflare.com) and qualflare_flutter documentation on 18 November 2026. Originally published 4 October 2026. Written by İbrahim Süren, founder of Qualflare.