tcms.xmlrpc.api.testcaserun module

tcms.xmlrpc.api.testcaserun.create(values)[source]
XML-RPC TestCaseRun.create(values)

Create new TestCaseRun object and store it in the database.

Parameters:values (dict) – Field values for tcms.testruns.models.TestCaseRun
Returns:Serialized tcms.testruns.models.TestCaseRun object
Raises:PermissionDenied if missing testruns.add_testcaserun permission

Minimal parameters:

>>> values = {
    'run': 1990,
    'case': 12345,
    'build': 123,
}
>>> TestCaseRun.create(values)
tcms.xmlrpc.api.testcaserun.update(case_run_id, values, **kwargs)[source]
XML-RPC TestCaseRun.update(case_run_id, values)

Update the selected TestCaseRun

Parameters:
Returns:

Serialized tcms.testruns.models.TestCaseRun object

Raises:

PermissionDenied if missing testruns.change_testcaserun permission

tcms.xmlrpc.api.testcaserun.filter(values)[source]
XML-RPC TestCaseRun.filter(values)

Perform a search and return the resulting list of test case executions.

Parameters:values (dict) – Field lookups for tcms.testruns.models.TestCaseRun
Returns:List of serialized tcms.testruns.models.TestCaseRun objects
Return type:list(dict)
tcms.xmlrpc.api.testcaserun.add_comment(case_run_id, comment, **kwargs)[source]
XML-RPC TestCaseRun.add_comment(case_run_id, comment)

Add comment to selected test case run.

Parameters:
  • case_run_id – PK of a TestCaseRun object
  • case_run_id – int
  • comment – The text to add as a comment
  • comment – str
Returns:

None or JSON string in case of errors

tcms.xmlrpc.api.testcaserun.add_log(case_run_id, name, url)[source]
XML-RPC TestCaseRun.add_log(case_run_id, name, url)

Add new log link to a TestCaseRun

Parameters:
  • case_run_id (int) – PK of a TestCaseRun object
  • name (str) – Name/description of the log
  • url (str) – URL of the log
Returns:

ID of created log link

Return type:

int

Raises:

RuntimeError if operation not successfull

tcms.xmlrpc.api.testcaserun.get_logs(case_run_id)[source]
XML-RPC TestCaseRun.get_logs(case_run_id)

Get log links for the specified TestCaseRun

Parameters:case_run_id (int) – PK of TestCaseRun object
Returns:Serialized list of tcms.core.contrib.linkreference.models.LinkReference objects
tcms.xmlrpc.api.testcaserun.remove_log(case_run_id, link_id)[source]
XML-RPC TestCaseRun.remove_log(case_run_id, link_id)

Remove log link from TestCaseRun

Parameters:
  • case_run_id (int) – PK of TestCaseRun to modify
  • link_id (int) – PK of link to remove
Returns:

None