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

Parameters:run_pk (int) – run’s pk whose comments will be retrieved.
Returns:the mapping between case run id and comments
Return type: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
Parameters:case_runs (iterable) – iterable object containing case runs
Returns:a mapping between statistics target and its value
Return type:dict
static stats_mode_case_runs(case_runs)[source]

Statistics from case runs mode

Parameters:case_runs (iterable, list, tuple) – iteratable object to access each case run
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