robottelo
robottelo copied to clipboard
Add support for reporting/commenting test results to the Jira issue
What does this do?
- This PR adds support for reporting/commenting test results to Jira based on issues referenced in the
Verifies
orBlockedBy
doc fields.
Primary use case
- Add a
Verifies
orBlockedBy
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 theReview
(ON_QA) state. This behavior can be overridden by using the--blocked-by SAT-25230
option.
- For
- Set
ENABLE_COMMENT
totrue
in thejira.yaml
configuration file. - 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