Tags - TestlumFramework/Testlum GitHub Wiki

🏷️ Scenario Tags Management in Testlum

Testlum provides a flexible mechanism to organize, enable, and disable scenarios globally using tags.

This feature allows you to quickly control which groups of tests should run without modifying individual test files.

⚙️ Global Tag Configuration

You can define your available tags and their active status globally in the global-config.xml file:

<runScenariosByTag enabled="true">
    <tag name="web" enabled="true"/>
    <tag name="api" enabled="false"/>
</runScenariosByTag>
  • enabled="true" → The tag is active; related scenarios will be collected and executed.
  • enabled="false" → The tag is inactive; related scenarios will be skipped.

Enabling/Disabling tags globally controls all scenarios attached to those tags at once.

🗂️ Local Tag Assignment in Scenarios

Each scenario.xml file can declare which tags it belongs to using the <settings> block:

<settings>
    <tags>web,api,db</tags>
</settings>
  • A scenario can belong to multiple tags.
  • Tag names are comma-separated.

Tag alignment allows you to group tests logically (e.g., web, api, db) and later run or skip them easily.

🚀 How It Works Together

  • If runScenariosByTag is enabled globally → only scenarios whose tags are globally enabled will be executed.
  • If a scenario's tags are disabled globally → that scenario will be skipped automatically.
  • If runScenariosByTag is disabled → Testlum will ignore all tag settings and run all active scenarios.

📌 Best Practices

  • Use simple lowercase names for tags (e.g., web, api, mobile, regression).
  • Always group scenarios logically according to business areas or test levels.
  • Disable heavy or unstable test groups easily when needed without modifying scenarios.
  • Maintain tag consistency across projects for easier maintenance and team onboarding.

By using tags effectively, you can organize large test suites, focus your test runs, and manage execution scopes easily — all from a single place! 🛠️

⚠️ **GitHub.com Fallback** ⚠️