Skip to content

Make tests compile and run faster #69429

Description

@HerrNiklasRaab

Use case

According to flutter.dev one of the things flutter aims at is fast development. I think being able to develop in a TDD workflow contributes to this goal.

In our case, we have suite about 500 tests, consisting of unit and widget tests. In order to facilitate a real TDD workflow, all the tests should run very fast. There are some sources that suggest a maximum executing time of less than 10s: https://blog.ploeh.dk/2012/05/24/TDDtestsuitesshouldrunin10secondsorless/#:~:text=The%20test%20suite%20you%20work,be%20faster%20than%2010%20milliseconds.

Currently, our test suite is executing in about 2min, which makes the TDD approach very hard, because it disrupts your workflow (better described in the article).

Proposal

The aim of this ticket is more to collect all the tickets, that would contribute to a better TDD experience. So please add additional things that prevent you from a good TDD experience.

Live Unit Testing

#4719
Dart-Code/Dart-Code#2878

Improve Performance of Tests

#17130
dart-lang/sdk#32953

Hot Reload for Unit Tests

#25973
https://github.com/szotp/hottie/

Please consider 👍 this and linked tickets if you thing this is important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: performanceRelates to speed or footprint issues (see "perf:" labels)c: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.perf: speedPerformance issues related to (mostly rendering) speedteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions