tcms.issuetracker.types module¶
This module implements Kiwi TCMS interface to external issue tracking systems. Refer to each implementor class for integration specifics!
-
class
tcms.issuetracker.types.
GitHub
(bug_system, request)[source]¶ Bases:
tcms.issuetracker.base.IssueTrackerType
Support for GitHub. Requires:
Base_url: URL to a GitHub repository for which we’re going to report issues Api_password: GitHub API token - needs repo
orpublic_repo
permissionsNote
You can leave the
api_url
andapi_username
fields blank because the integration code doesn’t use them!-
details
(url)[source]¶ Use GitHub’s API instead of OpenGraph to return bug details b/c it will work for both public and private URLs.
-
is_adding_testcase_to_issue_disabled
()[source]¶ When is linking a TC to a Bug report disabled? Usually when not all of the required credentials are provided.
Returns: True if bug system api url, username and password are provided Return type: bool
-
it_class
¶
-
-
class
tcms.issuetracker.types.
Gitlab
(bug_system, request)[source]¶ Bases:
tcms.issuetracker.base.IssueTrackerType
Support for GitLab. Requires:
Base_url: URL to a GitLab repository for which we’re going to report issues. For example https://gitlab.com/kiwitcms/integration-testing Api_url: URL to a GitLab instance. For example https://gitlab.com Api_password: GitLab API token with the api
scope. See https://gitlab.com/-/profile/personal_access_tokensNote
You can leave
api_username
field blank because the integration code doesn’t use it!-
details
(url)[source]¶ Use Gitlab API instead of OpenGraph to return bug details b/c it will work for both public and private URLs.
-
is_adding_testcase_to_issue_disabled
()[source]¶ When is linking a TC to a Bug report disabled? Usually when not all of the required credentials are provided.
Returns: True if bug system api url, username and password are provided Return type: bool
-
it_class
¶
-
report_issue_from_testexecution
(execution, user)[source]¶ When marking TestExecution results inside a Test Run there is a Report link. When the Report link is clicked this method is called to help the user report an issue in the IT.
This is implemented by constructing an URL string which will pre-fill bug details like steps to reproduce, product, version, etc from the test case. Then we open this URL into another browser window!
Execution: TestExecution object User: User object Returns: - string - URL
-
-
class
tcms.issuetracker.types.
JIRA
(bug_system, request)[source]¶ Bases:
tcms.issuetracker.base.IssueTrackerType
Support for JIRA. Requires:
Base_url: the URL of this JIRA instance. For example https://kiwitcms.atlassian.net Api_username: a username registered in JIRA Api_password: API token for this username, see https://id.atlassian.com/manage-profile/security/api-tokens Important
The field
API URL
is not used for Jira integration and can be left blank!Additional control can be applied via the
JIRA_OPTIONS
configuration setting (inproduct.py
). By default this setting is not provided and the code usesjira.JIRA.DEFAULT_OPTIONS
from thejira
Python module!-
classmethod
bug_id_from_url
(url)[source]¶ Jira IDs are the last group of chars at the end of the URL. For example https://issues.jenkins-ci.org/browse/JENKINS-31044 will return an ID of JENKINS-31044
-
details
(url)[source]¶ Returns bug details to be used later. By default this method returns OpenGraph metadata (dict) which is shown in the UI as tooltips. You can override this method to provide different information.
-
is_adding_testcase_to_issue_disabled
()[source]¶ When is linking a TC to a Bug report disabled? Usually when not all of the required credentials are provided.
Returns: True if bug system api url, username and password are provided Return type: bool
-
it_class
¶
-
report_issue_from_testexecution
(execution, user)[source]¶ JIRA Project == Kiwi TCMS Product, otherwise defaults to the first found Issue Type == Bug or the first one found
If 1-click bug report doesn’t work then fall back to manual reporting!
For the HTML API description see: https://confluence.atlassian.com/display/JIRA050/Creating+Issues+via+direct+HTML+links
-
classmethod
-
class
tcms.issuetracker.types.
Redmine
(bug_system, request)[source]¶ Bases:
tcms.issuetracker.base.IssueTrackerType
Support for Redmine. Requires:
Base_url: the URL for this Redmine instance. For example http://redmine.example.org:3000 Api_username: a username registered in Redmine Api_password: the password for this username -
details
(url)[source]¶ Returns bug details to be used later. By default this method returns OpenGraph metadata (dict) which is shown in the UI as tooltips. You can override this method to provide different information.
-
is_adding_testcase_to_issue_disabled
()[source]¶ When is linking a TC to a Bug report disabled? Usually when not all of the required credentials are provided.
Returns: True if bug system api url, username and password are provided Return type: bool
-
it_class
¶ alias of
tcms.issuetracker.redmine_integration.RedmineThread
-
redmine_project_by_name
(name)[source]¶ Return a Redmine project which matches the given product name. If there is no match then return the first project in Redmine!
-
static
redmine_tracker_by_name
(project, name)[source]¶ Return a Redmine tracker matching name (‘Bugs’). If there is no match then return the first one!
-
report_issue_from_testexecution
(execution, user)[source]¶ When marking TestExecution results inside a Test Run there is a Report link. When the Report link is clicked this method is called to help the user report an issue in the IT.
This is implemented by constructing an URL string which will pre-fill bug details like steps to reproduce, product, version, etc from the test case. Then we open this URL into another browser window!
Execution: TestExecution object User: User object Returns: - string - URL
-