Skip to content

Consider making flutter drive default to using dart test as the runner script #152409

@matanlurey

Description

@matanlurey

As of 2024-07-26, we discovered, that due to how the dart CLI has evolved, it's now possible to opt-in to using the dart test runner (instead of running a given driver script as a standalone Dart executable).

This allows, among other things, to customize the reporter and file reporter. For example:

# Old behavior, runs `dart test/main_test.dart`.
flutter drive

# Opt-in behavior, runs `dart test test/main_test.dart`
flutter drive --test-arguments="test"

# An example of using this behavior to customize the reporter
flutter drive --test-arguments="test --reporter=expanded"

I personally believe that using a mature test runner like dart test is a better long-term outlook for the tool, versus asking users to opt-in to it, or provide their own tooling by default, so I'd like to see us flip the behavior, for example:

# Uses dart test
flutter drive

# Opts-out of using dart test (flag TBD)
flutter drive --custom-test-runner

However, this would be a breaking change, and we should prioritize this accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.p: requires breaking changeA change that should be batched into the next breaking change to this packaget: flutter driver"flutter driver", flutter_drive, or a driver testteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    Status

    Not planned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions