Skip to content

flutter test -d should give a warning/error #154850

@justinmc

Description

@justinmc

Use case

I often mistakenly run things like flutter test -d chrome1, with the expectation that my test platform will be Chrome. Instead of erroring or telling me what I did wrong, the tests will be executed with the default platform without a problem. I'll admit that this has tricked me into thinking that my tests passed on Chrome before...

Proposal

Instead, if flutter test receives an invalid -d flag, it should output a suggestion to try the --platform flag. I'd also argue that it shouldn't run the tests at all in that scenario.

Footnotes

  1. That's the correct flag for flutter run, but for flutter test it should be --platform=chrome.

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: new featureNothing broken; request for a new capabilityr: duplicateIssue is closed as a duplicate of an existing issueteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy