Skip to content

Tests with coverage takes 10x time than just running flutter test #86722

@jorgecoca

Description

@jorgecoca

Details

A codebase with 80 tests (unit and widget tests) takes 12 seconds to run tests (both unit and widget tests) without coverage and a seed; however, it takes 3 and half minutes to to complete with coverage and a random seed.

❯ flutter test
00:12 +80: All tests passed!
❯ flutter test --no-pub --coverage --test-randomize-ordering-seed random
Shuffling test order with --test-randomize-ordering-seed=1858316085
03:36 +80: All tests passed!

Flutter Doctor:

❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 2.3.0-24.1.pre, on macOS 11.4 20F71 darwin-x64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.58.2)
[✓] Connected device (2 available)

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: tests"flutter test", flutter_test, or one of our testsc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: vroomdependency: dartDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions