Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use @Issue annotation #81

Open
bindusadu opened this issue Dec 16, 2024 · 1 comment
Open

How to use @Issue annotation #81

bindusadu opened this issue Dec 16, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@bindusadu
Copy link

Describe the bug
I am trying to use the new @issue annotation for known failures. How is this feature supposed to work? Is there any documentation? I found this unit test and tried to use it the same way but in the Report Portal launches - the test is still failing and I do not see any mention of the issue or comment. I have also tried
@Issue(value = "<JiraProject>-1327", comment = "This test is linked to a known issue in JIRA", external = @ExternalIssue( value = "<JiraProject>-1327", btsUrl = "<btsUrl>", btsProject = "<btsProject>" ))

Steps to Reproduce
Steps to reproduce the behavior:

  1. Add @issue annotation to a Test method with comment and value of the integrated Jira ticket number
  2. Run the suite on CI (GHA)

Expected behavior
I am not entirely sure what to expect here. I guess - Test is marked as a known failure or doesn't show as a failure?

Actual behavior
Test is still failing without any link to the Jira ticket number or comment mentioned.

Dependency versions
agent-java-junit5-5.3.4.jar
client-java-5.2.20.jar

@bindusadu bindusadu added the bug Something isn't working label Dec 16, 2024
@HardNorth
Copy link
Member

@bindusadu Please read @Issue annotation description:
https://github.com/reportportal/client-java/blob/develop/src/main/java/com/epam/reportportal/annotations/Issue.java#L31

Type (Locator), Short Name (Abbreviation) or Long Name (Defect name) (specified by priority) of an Issue on ReportPortal for
the current project. If there is no such issue found in Project Setting the value will be used "as is" and sent as
Issue Type (Locator).

You are trying to specify value = "<JiraProject>-1327" which is issue ID in your BTS, I suppose, and this is incorrect, according to the description. This value should be put into @ExternalIssue annotation only.

@HardNorth HardNorth added help wanted Extra attention is needed and removed bug Something isn't working labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants