Skip to content

Running tests of a test class that has as many tests as there are test classes in the module will run all tests in the module #1183

Closed
@ahoppen

Description

@ahoppen

If you have a project with the following test file and no other tests and you try to run MyTests, then it will run MyOtherTests as well.

import XCTest

class MyTests: XCTestCase {
  func test1() {}
  func test2() {}
}

class MyOtherTests: XCTestCase {
  func testOther() {}
}

I think the bug is that itemContainingAllArgs is just checking counts and because there are two tests to run, it thinks that all the tests in the module (or project, not sure about the granularity here) are included, because the module/project also has two children.

return xcTestArgs.length + swiftTestArgs.length === testItem.children.size;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions