tcms.rpc.api.testrun module¶
-
tcms.rpc.api.testrun.
add_attachment
(run_id, filename, b64content, **kwargs)[source]¶ -
RPC TestRun.add_attachment(run_id, filename, b64content)
Add attachment to the given TestRun.
Parameters:
-
-
tcms.rpc.api.testrun.
add_case
(run_id, case_id)[source]¶ -
RPC TestRun.add_case(run_id, case_id)
Add a TestCase to the selected test run.
Parameters: Returns: A list of serialized
tcms.testruns.models.TestExecution
objectsReturn type: Raises: - DoesNotExist – if objects specified by the PKs don’t exist
- PermissionDenied – if missing testruns.add_testexecution permission
- RuntimeError – if test case status is not CONFIRMED
-
-
tcms.rpc.api.testrun.
add_cc
(run_id, username)[source]¶ -
RPC TestRun.add_cc(run_id, username)
Add the chosen user to TestRun CC
Parameters: - run_id (int) – PK of TestRun to modify
- username (string) – PK, email or username
Raises: - DoesNotExist – if test run specified by the PK doesn’t exist
- PermissionDenied – if missing testruns.change_testrun permission
- ValueError – if data validations fail
-
-
tcms.rpc.api.testrun.
add_tag
(run_id, tag_name, **kwargs)[source]¶ -
RPC TestRun.add_tag(run_id, tag)
Add one tag to the specified test run.
Parameters: Returns: Serialized list of
tcms.management.models.Tag
objectsReturn type: Raises: - PermissionDenied – if missing testruns.add_testruntag permission
- TestRun.DoesNotExist – if object specified by PK doesn’t exist
- Tag.DoesNotExist – if missing management.add_tag permission and tag_name doesn’t exist in the database!
-
-
tcms.rpc.api.testrun.
create
(values, **kwargs)[source]¶ -
RPC TestRun.create(values)
Create new TestRun object and store it in the database.
Parameters: - values (dict) – Field values for
tcms.testruns.models.TestRun
- **kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
Returns: Serialized
tcms.testruns.models.TestRun
objectReturn type: Raises: - PermissionDenied – if missing testruns.add_testrun permission
- ValueError – if data validations fail
Example:
>>> values = {'build': 384, 'manager': 137, 'plan': 137, 'summary': 'Testing XML-RPC for TCMS', } >>> TestRun.create(values)
- values (dict) – Field values for
-
-
tcms.rpc.api.testrun.
filter
(query=None)[source]¶ -
RPC TestRun.filter(query)
Perform a search and return the resulting list of test runs.
Parameters: query (dict) – Field lookups for tcms.testruns.models.TestRun
Returns: List of serialized tcms.testruns.models.TestRun
objectsReturn type: list(dict)
-
-
tcms.rpc.api.testrun.
get_cases
(run_id)[source]¶ -
RPC TestRun.get_cases(run_id)
Get the list of test cases that are attached to a test run.
Parameters: run_id (int) – PK of TestRun to inspect Returns: Serialized list of tcms.testcases.models.TestCase
objects augmented withexecution_id
andstatus
information.Return type: list(dict)
-
-
tcms.rpc.api.testrun.
properties
(query=None)[source]¶ -
TestRun.
properties
(query)¶ Return all properties for the specified test run(s).
Parameters: query (dict) – Field lookups for tcms.testruns.models.Property
Returns: Serialized list of tcms.testruns.models.Property
objects.Return type: list(dict) Raises: PermissionDenied – if missing testruns.view_property permission
-
-
tcms.rpc.api.testrun.
remove_cc
(run_id, username)[source]¶ -
RPC TestRun.remove_cc(run_id, username)
Remove the chosen user from TestRun CC
Parameters: - run_id (int) – PK of TestRun to modify
- username (string) – PK, email or username
Raises: - DoesNotExist – if test run specified by the PK doesn’t exist
- PermissionDenied – if missing testruns.change_testrun permission
- ValueError – if data validations fail
-
-
tcms.rpc.api.testrun.
remove_tag
(run_id, tag_name)[source]¶ -
RPC TestRun.remove_tag(run_id, tag)
Remove a tag from the specified test run.
Parameters: Returns: Serialized list of
tcms.management.models.Tag
objectsReturn type: Raises: - PermissionDenied – if missing testruns.delete_testruntag permission
- DoesNotExist – if objects specified don’t exist
-
-
tcms.rpc.api.testrun.
update
(run_id, values)[source]¶ -
RPC TestRun.update(run_id, values)
Update the selected TestRun
Parameters: - run_id (int) – PK of TestRun to modify
- values (dict) – Field values for
tcms.testruns.models.TestRun
Returns: Serialized
tcms.testruns.models.TestRun
objectReturn type: Raises: - PermissionDenied – if missing testruns.change_testrun permission
- ValueError – if data validations fail
-