Skip to content

Test tagging and filtering — run subsets of tests by label #19

@ThomasMalletCodra

Description

@ThomasMalletCodra

Description

Add the ability to assign tags/labels to individual tests (e.g., @slow, @hardware, @regression, @smoke) and filter test execution by tag. This allows users to run specific subsets of their test plan depending on the context (quick dev check vs. full qualification).

Current behavior

  • All tests in a test plan are either run or not — no selective filtering.
  • No tagging mechanism for individual test items.
  • Users must manually select/deselect tests in the GUI to run subsets.

Expected behavior

  • Tests can be tagged via # guitest: directives:
    # guitest: show
    # guitest: tags: smoke, fast
    def test_basic_functionality():
        ...
  • Tags can also be assigned in moduletester.ini:
    [tags]
    tests/unit/ = unit, fast
    tests/integration/ = integration, slow
    tests/hardware/ = hardware, manual
  • CLI filtering:
    moduletester -p mypackage.tests --tags smoke
    moduletester -p mypackage.tests --exclude-tags slow,hardware
  • GUI filtering: tag filter bar/dropdown in the test plan view.
  • Tags are displayed as badges next to test names in the UI.

Implementation ideas

  1. Extend # guitest: parser to support a tags: directive.
  2. Add tags field to TestItem model.
  3. Add tag-based filtering in TestPlanModel.get_filtered_tests().
  4. GUI: add a filter toolbar with tag chips/checkboxes.
  5. CLI: add --tags and --exclude-tags arguments.

Acceptance criteria

  • Tests can be tagged via # guitest: tags: directive
  • Tests can be tagged via moduletester.ini configuration
  • CLI supports --tags and --exclude-tags filtering
  • GUI provides a tag filter in the test plan view
  • Tags are displayed next to test names in the UI
  • Multiple tags per test are supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions