robottelo icon indicating copy to clipboard operation
robottelo copied to clipboard

Add support for reporting/commenting test results to the Jira issue

Open jameerpathan111 opened this issue 9 months ago • 0 comments

What does this do?

  • This PR adds support for reporting/commenting test results to Jira based on issues referenced in the Verifies or BlockedBy doc fields.

Primary use case

  1. Add a Verifies or BlockedBy doc field to the test, mapping it to a Jira RFE/Bug. For example, :Verifies: SAT-25230 or :BlockedBy: SAT-24796.
    • For BlockedBy, the test will be collected only if the corresponding Jira issue is in the Review (ON_QA) state. This behavior can be overridden by using the --blocked-by SAT-25230 option.
  2. Set ENABLE_COMMENT to true in the jira.yaml configuration file.
  3. Use the --jira-comments pytest option. Note: To prevent accidental usage of this functionality, the user is required to perform both steps 2 and 3.(Open to suggestions)

PRT example

Assuming the test has Verifies or BlockedBy doc field set.

trigger: test-robottelo
pytest: tests/foreman/api/test_ping.py --jira-comments
env:
    ROBOTTELO_jira__enable_comment: true

Related Issues

  • SAT-24954
  • satellite-jenkins#1341

jameerpathan111 avatar May 17 '24 14:05 jameerpathan111