feat: add @QaseTags annotation for assigning tags to test cases#242
Merged
feat: add @QaseTags annotation for assigning tags to test cases#242
Conversation
Describes @QaseTags annotation, domain model changes, extraction logic for all 3 test sources (JUnit4/5, TestNG, Cucumber), API mapping, Gherkin tag parsing, and integration test updates.
ReportResult was missing the tags field, so QASE_MODE=report did not include tags in JSON output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@QaseTags({"smoke", "regression"})annotation for Java test methods (JUnit4, JUnit5, TestNG)@QaseTags=smoke,regressionGherkin tag for Cucumber scenarios (v3-v7)ResultCreateFields.tagsas comma-separated string in API v2@QaseFields(@Field(name = "tags", value = "smoke,regression"))as alternativeRef: qase-csharp PR #53
Changes
Core (
qase-java-commons)@QaseTags(method-level,String[] value())TestResult.tags(List<String>, initialized empty)IntegrationUtils.getQaseTags()— reflection-based extractionCucumberUtils.getCaseTags()— Gherkin tag parsing (@QaseTags=with=delimiter)TestResultBuilder— tags extraction in all 3 entry points (fromMethod,fromAnnotationReader,fromCucumber)ApiClientV2.convertResult()— maps tags tofields.setTags()with deduplication; handles"tags"key from fields mapTests
TestResultBuilderTest, 6 inCucumberUtilsTest)Documentation
Test plan
mvn test -pl qase-java-commons)mvn compile)