tcms.rpc.api.testexecution module

tcms.rpc.api.testexecution.create(values)[source]
XML-RPC TestExecution.create(values)

Create new TestExecution object and store it in the database.

Parameters:

values (dict) – Field values for tcms.testruns.models.TestExecution

Returns:

Serialized tcms.testruns.models.TestExecution object

Return type:

dict

Raises:
  • TypeError – if argument values is not in dict type
  • ValueError – if argument values is empty
  • ValueError – if data validations fail
  • PermissionDenied – if missing testruns.add_testexecution permission

Minimal parameters:

>>> values = {
    'run': 1990,
    'case': 12345,
    'build': 123,
}
>>> TestExecution.create(values)
tcms.rpc.api.testexecution.update(execution_id, values, **kwargs)[source]
XML-RPC TestExecution.update(execution_id, values)

Update the selected TestExecution

Parameters:
  • execution_id (int) – PK of TestExecution to modify
  • values (dict) – Field values for tcms.testruns.models.TestExecution
  • kwargs – Dict providing access to the current request, protocol entry point name and handler instance from the rpc method
Returns:

Serialized tcms.testruns.models.TestExecution object

Return type:

dict

Raises:
  • ValueError – if data validations fail
  • PermissionDenied – if missing testruns.change_testexecution permission
tcms.rpc.api.testexecution.filter(values)[source]
XML-RPC TestExecution.filter(values)

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

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

Add comment to selected test execution.

Parameters:
  • execution_id (int) – PK of a TestExecution object
  • comment (str) – The text to add as a comment
  • kwargs – Dict providing access to the current request, protocol entry point name and handler instance from the rpc method
Raises:

PermissionDenied – if missing django_comments.add_comment permission

tcms.rpc.api.testexecution.remove_comment(execution_id, comment_id=None)[source]
TestExecution.remove_comment(execution_id, comment_id)

Remove all or specified comment(s) from selected test execution.

Parameters:
  • execution_id (int) – PK of a TestExecution object
  • comment_id (int) – PK of a Comment object or None
Raises:

PermissionDenied – if missing django_comments.delete_comment permission

XML-RPC TestExecution.add_link(values)

Add new URL link to a TestExecution

Parameters:
  • values (dict) – Field values for tcms.core.contrib.linkreference.models.LinkReference
  • update_tracker (bool, default=False) – Automatically update Issue Tracker by placing a comment linking back to the failed TestExecution.
  • kwargs – Dict providing access to the current request, protocol entry point name and handler instance from the rpc method
Returns:

Serialized tcms.core.contrib.linkreference.models.LinkReference object

Return type:

dict

Raises:

RuntimeError – if operation not successfull

Note

Always ‘link’ with IT instance if URL is from Kiwi TCMS own bug tracker!

XML-RPC TestExecution.get_links(query)

Get URL links for the specified TestExecution

Parameters:query (dict) – Field lookups for tcms.core.contrib.linkreference.models.LinkReference
Returns:Serialized list of tcms.core.contrib.linkreference.models.LinkReference objects
Return type:dict
XML-RPC TestExecution.remove_link(query)

Remove URL link from TestExecution

Parameters:query (dict) – Field lookups for tcms.core.contrib.linkreference.models.LinkReference