Skip to content

Running unit tests with coverage enabled takes up to 10x times longer than without coverage #23157

@jorgecoca

Description

@jorgecoca

I have a test suite of 150 tests (unit tests, and widget tests). If I run them without coverage enabled (flutter test), they take less than 10 seconds to run; however, if I enabled coverage, (flutter test --coverage --coverage-path ./coverage/lcov.info), then it takes around 1 minute and 40 seconds.

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.1.1)
[✓] VS Code (version 1.28.1)
[✓] Connected devices (1 available)

• No issues found!

I am attaching the --verbose reports for more information:

test_report_no_coverage.txt
test_report_with_coverage_enabled.txt

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsc: performanceRelates to speed or footprint issues (see "perf:" labels)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

Relationships

None yet

Development

No branches or pull requests

Issue actions