tcms.issuetracker.base module

class tcms.issuetracker.base.IntegrationThread(rpc, bug_system, execution, bug_id)[source]

Bases: threading.Thread

Used as a base class for everything else.


Using RPC try to link the test case with existing bug! By default will post a comment!


Returns the text that will be posted as a comment to the reported bug!

class tcms.issuetracker.base.IssueTrackerType(bug_system, request)[source]

Bases: object

Represents actions which can be performed with issue trackers. This is a common interface for all issue trackers that Kiwi TCMS supports!

add_testexecution_to_issue(executions, issue_url)[source]

When linking defect URLs to Test Execution results there is a ‘Add comment to Issue tracker’ checkbox. If selected this method is called. It should ‘link’ the existing defect back to the TE/TR which reproduced it.

Usually this is implemented by adding a new comment pointing back to the TR/TE via the internal RPC object.

  • iterable of TestExecution objects
  • the URL of the existing defect
classmethod bug_id_from_url(url)[source]

Returns a unique identifier for reported defect. This is used by the underlying integration libraries. Usually that identifier is an integer number.

The default implementation is to leave the last group of numeric characters at the end of a string!


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.

static get_case_components(case)[source]

Returns a string that contains comma separated list of components bound to a given testcase


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

alias of IntegrationThread

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
  • string - URL

Returns an object which is used to communicate to the external system. This property is meant to be used by the rest of the integration code and provides caching b/c connecting to a remote system may be a slow operation.

rpc_cache = {}