Skip to content

feat: add @QaseTags annotation for assigning tags to test cases#242

Merged
gibiw merged 16 commits intomainfrom
feat/tags-support
Apr 8, 2026
Merged

feat: add @QaseTags annotation for assigning tags to test cases#242
gibiw merged 16 commits intomainfrom
feat/tags-support

Conversation

@gibiw
Copy link
Copy Markdown
Contributor

@gibiw gibiw commented Apr 7, 2026

Summary

  • Added @QaseTags({"smoke", "regression"}) annotation for Java test methods (JUnit4, JUnit5, TestNG)
  • Added @QaseTags=smoke,regression Gherkin tag for Cucumber scenarios (v3-v7)
  • Tags are mapped to ResultCreateFields.tags as comma-separated string in API v2
  • Also supports @QaseFields(@Field(name = "tags", value = "smoke,regression")) as alternative
  • Bumped version to 4.1.50

Ref: qase-csharp PR #53

Changes

Core (qase-java-commons)

  • New annotation: @QaseTags (method-level, String[] value())
  • New field: TestResult.tags (List<String>, initialized empty)
  • IntegrationUtils.getQaseTags() — reflection-based extraction
  • CucumberUtils.getCaseTags() — Gherkin tag parsing (@QaseTags= with = delimiter)
  • TestResultBuilder — tags extraction in all 3 entry points (fromMethod, fromAnnotationReader, fromCucumber)
  • ApiClientV2.convertResult() — maps tags to fields.setTags() with deduplication; handles "tags" key from fields map

Tests

  • 13 new unit tests (7 in TestResultBuilderTest, 6 in CucumberUtilsTest)
  • Updated expected YAML files for integration tests
  • Updated example tests for all frameworks

Documentation

  • Changelog entry for 4.1.50
  • Usage guide section "Adding Tags" in JUnit5 docs
  • Features list updated in JUnit4, JUnit5, TestNG, Cucumber 7 READMEs

Test plan

  • All 301 unit tests pass (mvn test -pl qase-java-commons)
  • Full project compiles (mvn compile)
  • Run integration tests with reporters-validator
  • Verify tags appear in Qase TestOps after reporting

@gibiw gibiw merged commit bcab24d into main Apr 8, 2026
14 checks passed
@gibiw gibiw deleted the feat/tags-support branch April 8, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant