Skip to content

Web integration suite passes even when tests fail #237

Description

@ddfreiling

Problem

The web integration suite reports All tests passed regardless of what the tests do. A deliberate expect(1, 2) placed inside Timebased playback audio starts without a reader view DiViNa comic produced a clean pass and exit code 0.

The driver's verdict comes from IntegrationTestWidgetsFlutterBinding:

List<Failure> get failureMethodsDetails => results.values.whereType<Failure>().toList();
...
_allTestsPassed.complete(failureMethodsDetails.isEmpty);

results is only ever written from two places, and both are reached only by testWidgets:

  • results[description] ??= _success; in runTest
  • results[testDescription] = Failure(...) via reportTestException

integration_test/groups/ is written almost entirely with plain test(). Those never touch results, so on web nothing is recorded — and an empty result map is indistinguishable from a perfect run. Native is unaffected: flutter test uses the normal runner and never consults that map.

Consequence: web integration coverage is currently decorative. A test that stops running, or fails, looks exactly like a test that passes.

Fix

Convert the plain test() calls under flutter_readium/example/integration_test/groups/ to testWidgets() so results are reported. Roughly 47 tests across 8 files; mechanical, no logic changes.

Worth adding alongside it: a self-check that fails the run when the reported result count is zero, so this class of hollow pass cannot come back silently.

Related

  • .github/workflows/integration-test-web.yml is on: workflow_call with no caller anywhere in the repo, and is marked continue-on-error: true # allowed to fail for now. The suite has never run in CI, which is why this went unnoticed. Wiring it up is only worthwhile once results are real.
  • Separately fixed: the runner used -d chrome, which hangs indefinitely when the developer already has Chrome open. bin/integration_test_web now uses -d web-server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions