Skip to content

Support for adding tags to suites/contexts/examples #42

Open
@regexident

Description

@regexident

I have the feeling that instead of implementing dedicated logic for skipping of/focussing on specific suites/contexts/examples it might be a good idea to instead add support for adding custom tags.

This along with a way to filter for tags (both positively foo, as well as negatively ~bar) would then add functionality equivalent to these features:


And as we're doing Rust we might as well go the extra mile and make the tags type-safe.

Suite/Context/Example would thus be generic over E: Environment as well as T: Tag.

Proof-of-concept

(We should further more be able to provide a stable derive for TryFrom<&'a str> for T via macros 1.1, afaict.)

This way one would define the Tags for a given test scenario (group of suites tied to the types of a given Environment), and any typo within the test code would be caught by the compiler, while passing an unknown tag to an (at this point still) imaginary CLI à la cargo spec --filter="baz" would trigger an error message on execution.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions