Skip to content

Test view run buttons should "run what you see" #130522

@connor4312

Description

@connor4312
  1. Filter the Test Explorer View, e.g. to show only the active document
  2. Use the "run all" button
  3. All tests are run, even ones you don't see

Instead we should only run the displayed tests. The algorithm for this I currently use is:

  1. Loop through the virtual test roots. For each test:

  2. If the current subtree is marked as "included"
    a. Then if this test is not visible in the tree, pass it to TestRunRequest.exclude

  3. Otherwise:
    a. If this test can be used with the current test run profile (if any), and it does not have exactly one visible child, and it's either a leaf node or the majority of a children are visible, then: add this subtree to TestRunRequest.include
    b. The "not exactly one child" is used to avoid including parent tests who might only be visible because a child is visible and result in a large exclude set later, for example in this case we want to run only "ArrayQueue":

    image
  4. For each child of the current test, go to (2)

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsiderstestingBuilt-in testing supportverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions