Skip to content

Run specific test by fully qualified name #55623

Open
@mchernyavsky

Description

@mchernyavsky

Suppose I have two test targets:

  1. tests/tests1.rs
#[test]
fn test1() {
    panic!()
}

#[test]
fn test2() {}
  1. tests/tests2.rs
#[test]
fn test1() {}

#[test]
fn test2() {
    panic!()
}

I want to run only test1 from tests1 and test2 from tests2. The --exact option doesn't help me in this case.

I want to have some option to run a specific test, like this:

cargo test --no-fail-fast --test tests1 --test tests2 -- --fqn tests1::test1 --fqn tests2::test2

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-testing-devexRelevant to the testing devex team (testing DX), which will review and decide on the PR/issue.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions