Skip to content

Centralized location for test file output #17259

Closed as not planned
Closed as not planned

Description

@tvolkert

If we had the notion of a test output folder, tests would have the flexibility to not only write to stdout and stderr, but to write more helpful info, like the contents of adb logs, screenshots, etc.

Proposal

During flutter test, we have The Flutter tool create a temp folder before running any tests. For each test in the suite, the test harness will create a subfolder dedicated to that test and set the path of that subfolder into an environment variable (e.g. TEST_OUTPUT_DIR) before spawning the test.

When each test is done running, if it did not output anything into its folder, the test harness will delete the empty directory. When all tests are done running, if none of the tests wrote any output files, it'll delete the temp directory.

If any files were written during any of the tests, the Flutter tool will keep the temp directory intact and print a message to the caller that "test outputs are available at ..."

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    toolAffects the "flutter" command-line tool. See also t: labels.
    on May 3, 2018
  2. self-assigned this
    on Apr 13, 2019
  3. removed their assignment
    on Jun 12, 2019
  4. added this to the August 2019 milestone on Jun 12, 2019
  5. self-assigned this
    on Jun 12, 2019
  6. removed their assignment
    on Aug 19, 2019
  7. modified the milestones: August 2019, on Aug 19, 2019
  8. changed the title [-]Allow centralized place where tests can output files[/-] [+]Centralized location for test file output[/+] on Jan 3, 2020
  9. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  10. tvolkert commented on Jul 17, 2020

    @tvolkert
    ContributorAuthor

    Noting that as of July 2020, this would still be nice to have.

  11. removed this from the milestone on Aug 17, 2020
  12. tvolkert commented on Oct 22, 2021

    @tvolkert
    ContributorAuthor

    Triaging all the bugs I've ever created. As of Oct 2021, this would still be nice to have.

  13. added
    team-toolOwned by Flutter Tool team
    triaged-toolTriaged by Flutter Tool team
    and removed
    triaged-toolTriaged by Flutter Tool team
    on Jul 8, 2023
  14. flutter-triage-bot commented on Jul 9, 2023

    @flutter-triage-bot

    This issue is assigned but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  15. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jul 30, 2023
  16. removed their assignment
    on Aug 11, 2023
  17. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Aug 12, 2023
  18. added
    P3Issues that are less important to the Flutter project
    and removed
    P2Important issues not at the top of the work list
    on May 30, 2024
  19. github-actions commented on Jul 11, 2025

    @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.

  20. locked as resolved and limited conversation to collaborators on Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our teststeam-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