Skip to content

Dart: Run All Tests - producing strange test hierarchy and results #3603

@up-doc

Description

@up-doc

Describe the bug
In a multi package workspace consisting of an app and some libraries, when running the extensions Dart: Run All Tests the resulting hierarchy in the the testing panel is strange or wrong. Some tests look like they've been skipped, the tests under the file name are wrong or don't exist. Causing lots of issues identifying and fixing failing tests in a larger project. Only started happening after upgrading extension. Same weird output whether you are having Use VS Code test runner enabled or not.

This also introduces issues where you would right click on what you would expect to be a test under that file and click Go To Test only to have it point to the bottom of a file. Or tap Run test only to have the console spit out something like (No tests match regular expression "^adds one( (variant: .*))?$".)

To Reproduce
Steps to reproduce the behavior:

  1. Open the repro_workspace folder in vs code
  2. Execute Dart: Run All Tests

Expected behavior
The test files should be the top of the collapsable section with the tests within that file actually shown underneath with their success or failure status.

Screenshots

Screenshot 2021-10-11 at 10 08 24

Screenshot 2021-10-11 at 10 11 49

Versions (please complete the following information):

  • VS Code version: Version: 1.61.0
    Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea

  • Dart extension version: v3.27.1

  • Dart/Flutter SDK version: Flutter 2.2.3

Workspace to reproduce issues in:
repro_workspace.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions