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
- Extend
# guitest: parser to support a tags: directive.
- Add
tags field to TestItem model.
- Add tag-based filtering in
TestPlanModel.get_filtered_tests().
- GUI: add a filter toolbar with tag chips/checkboxes.
- CLI: add
--tags and --exclude-tags arguments.
Acceptance criteria
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
Expected behavior
# guitest:directives:moduletester.ini:[tags] tests/unit/ = unit, fast tests/integration/ = integration, slow tests/hardware/ = hardware, manualImplementation ideas
# guitest:parser to support atags:directive.tagsfield toTestItemmodel.TestPlanModel.get_filtered_tests().--tagsand--exclude-tagsarguments.Acceptance criteria
# guitest: tags:directivemoduletester.iniconfiguration--tagsand--exclude-tagsfiltering