tcms.testruns.data module

class tcms.testruns.data.TestExecutionDataMixin[source]

Bases: object

Data for test executions

static get_execution_bugs(run_pk)[source]

Get execution bugs for run report

Parameters:run_pk (int) – run’s pk whose executions’ bugs will be retrieved.
Returns:the mapping between execution id and bug information containing formatted bug URL.
Return type:dict
static get_execution_comments(run_pk)[source]

Get executions’ comments

Parameters:run_pk (int) – run’s pk whose comments will be retrieved.
Returns:the mapping between execution id and comments
Return type:dict
static get_summary_stats(executions)[source]

Get summary statistics from executions

Statistics targets:

  • the number of pending test executionss, whose status is IDLE
  • the number of completed test executionss, whose status are PASSED, ERROR, FAILED, WAIVED
Parameters:executions (iterable) – iterable object containing executionss
Returns:a mapping between statistics target and its value
Return type:dict
static stats_mode_executions(executions)[source]

Statistics from executions mode

Parameters:executions (iterable, list, tuple) – iteratable object to access each execution
Returns:mapping between mode and the count. Example return value is { ‘manual’: I, ‘automated’: J }
Return type:dict
tcms.testruns.data.get_run_bug_ids(run_id)[source]

Get list of pairs of bug ID and bug link that are added to a run

Parameters:run_id (int) – ID of test run.
Returns:list of pairs of bug ID and bug link.
Return type:list