tcms.testruns.data module

class tcms.testruns.data.TestCaseRunDataMixin[source]

Bases: object

Data for test case runs

static get_case_runs_bugs(run_pk)[source]

Get case run bugs for run report

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

Get case runs’ comments

@param run_pk: run’s pk whose comments will be retrieved. @type run_pk: int @return: the mapping between case run id and comments @rtype: dict

static get_summary_stats(case_runs)[source]

Get summary statistics from case runs

Statistics targets: - the number of pending test case runs, whose status is IDLE - the number of completed test case runs, whose status are PASSED,

ERROR, FAILED, WAIVED

@param case_runs: iterable object containing case runs @type case_runs: iterable @return: a mapping between statistics target and its value @rtype: dict

static stats_mode_case_runs(case_runs)[source]

Statistics from case runs mode

@param case_runs: iteratable object to access each case run @type case_runs: iterable, list, tuple @return: mapping between mode and the count. Example return value is

{ ‘manual’: I, ‘automated’: J, ‘manual_automated’: N }

@rtype: 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