Skip to content

Provide option for Flutter driver to create machine-readable output #51135

Closed

Description

@kf6gpe

This came up in a chat with @helinanever and @martinjeret at Nevercode, who indicated that this would be useful for some of their clients in building E2E CI/CD/test solutions.

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Feb 20, 2020
  2. jmagman commented on Feb 20, 2020

    @jmagman
    Member

    Subset of #14134.

  3. jmagman commented on Feb 20, 2020

    @jmagman
    Member

    See also #50449.

  4. NanYeYe commented on Mar 30, 2020

    @NanYeYe

    @kf6gpe @jmagman
    Is here have solution now?

  5. dnfield commented on May 13, 2020

    @dnfield
    Contributor

    This may not be necessary if you can use package:e2e instead.

  6. added
    a: tests"flutter test", flutter_test, or one of our tests
    on May 13, 2020
  7. added
    P3Issues that are less important to the Flutter project
    on Aug 18, 2020
  8. ened commented on Dec 22, 2020

    @ened
    Contributor

    This may not be necessary if you can use package:e2e instead.

    @dnfield Is this functionality (machine readable output) already available in e2e (integration_test) packages? I can not find it, yet.

  9. dnfield commented on Dec 24, 2020

    @dnfield
    Contributor

    No, but it should be possible.

    I'm actually not sure why the machine reporter can't be used with package:flutter_driver though. /cc @jiahaog who might know

  10. jiahaog commented on Dec 28, 2020

    @jiahaog
    Member

    Currently flutter drive does not use the reporting mechanism from package:test, and the host script is executed just like any other dart script. This also means that -rexpanded argument that is passed by default doesn't do anything.

    I put together #73017 as a quick hack to show the pieces that are needed for this.

    Then something like

    flutter drive --driver=test_driver/driver.dart  --target=lib/main.dart --test-arguments='--reporter=json'

    Could work, or we could provide something like --machine to flutter drive to avoid leaking the package:test abstraction

  11. rrousselGit commented on Oct 10, 2021

    @rrousselGit
    Contributor

    Hello!

    This is something that I would like to work on.
    Is adding a flutter drive --reporter=json reasonable? Assuming this would work by relaying the flag to test

  12. DanTup commented on Oct 11, 2021

    @DanTup
    Contributor

    @rrousselGit I don't know if it covers everything, but you can write integration tests to work with the flutter test command now (see https://flutter.dev/docs/testing/integration-tests#running-using-the-flutter-command). This works with the JSON reporter and is what VS Code now uses so you can have integration tests in the test runner tree.

  13. cheuk0324 commented on Feb 21, 2024

    @cheuk0324
  14. added
    P2Important issues not at the top of the work list
    and removed
    P3Issues that are less important to the Flutter project
    on Jul 26, 2024
  15. self-assigned this
    on Jul 26, 2024
  16. matanlurey commented on Jul 26, 2024

    @matanlurey
    Contributor

    It turns out this feature accidentally is supported, so I am going to document it.

    Making this more first-class (and the default) is more work that I'll track elsewhere:

    #152409

  17. github-actions commented on Aug 10, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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 capabilityteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions