Testopia:Documentation:XMLRPC:TestCaseRun: Difference between revisions

Replacing page with ' see http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/TestCaseRun.html'
(fixed on-error results info)
(Replacing page with ' see http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/TestCaseRun.html')
 
Line 1: Line 1:
__NOEDITSECTION__
  see http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/TestCaseRun.html
Back to [[Testopia:Documentation:XMLRPC |Testopia XML-RPC API]]
 
==TestCaseRun==
 
===Description===
A test case run is a record in the test_case_runs table which joins test cases to test runs. Basically, for each test run a selection of
test cases is made to be included in that run. As a test run progresses, testers set statuses on each of the cases in the run.
 
===Hiearchy===
Bugzilla::WebService::Testopia::TestCaseRun
 
===Attributes===
 
{| border=1 cellpadding=4
| '''Attribute''' || '''Data Type''' || '''Comments''' || '''Create''' || '''Read''' || '''Update'''
|-
| assignee || integer || ID value || Required || X || X
|-
| build_id || integer || || Required || X || X
|-
| canview || integer || ||  || X ||
|-
| case_id || integer ||  || Required || X ||
|-
| case_run_id || integer ||  ||  || X ||
|-
| case_run_status_id || integer ||  ||  || X ||
|-
| case_text_version || integer || || Required || X ||
|-
| close_date || string || Format: yyyy-mm-dd hh:mm:ss ||  || X ||
|-
| environment_id || integer ||  || Required || X ||
|-
| iscurrent || integer || || || X ||
|-
| notes || string || || Optional || X || X
|-
| run_id || integer ||  || Required || X ||
|-
| sortkey || integer ||  || || X ||
|-
| testedby || integer || ID value || || X ||
|-
|}
 
 
===Methods===
 
----
====get - Get A TestCaseRun by ID====
----
 
=====Usage=====
TestCaseRun.get
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| case_run_id || integer || Must be greater than 0.
|-
|}
 
 
=====Result=====
A hash map of key/value pairs for the attributes listed above on success; on error, an XmlRpcException is thrown.
 
=====Example=====
<b>Perl</b>
my $caserun_id = 1;
my $result = $proxy->call("TestCaseRun.get", $caserun_id);
 
 
----
 
====list - Get A List of TestCaseRuns Based on A Query====
----
 
=====Usage=====
TestCaseRun.list
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| query || hashmap || Can not be null.  See [[Bugzilla_XML-RPC_API_Query_Examples |Query Examples]].
|-
|}
 
 
=====Result=====
An array of TestCaseRun hash maps or a hash map containing values for the keys on success; on error, an XmlRpcException is thrown.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call("TestCaseRun.list", {build_id => 1, case_id => 1});
 
 
----
====create - Create A New TestCaseRun====
----
 
=====Usage=====
TestCaseRun.create
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| new_values || hashmap || See required attributes list<sup>1</sup> below.
|-
|}
 
<sup>1</sup> Required attributes: assignee, build_id, case_id, case_text_version, environment_id, and run_id
 
<sup>2</sup> case_run_status_id always set to 1 (IDLE) on create
 
 
=====Result=====
An integer value representing the new test case run id on success; on error, an XmlRpcException is thrown.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call("TestCaseRun.list", {assignee => 1, build_id => 1, case_id => 1, case_text_version => 1, environment_id => 1, run_id => 1});
 
 
----
====update - Update An Existing TestCaseRun====
----
 
=====Usage=====
TestCaseRun.update
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
| case_id || integer ||
|-
| build_id || integer ||
|-
| environment_id || integer ||
|-
| new_values<sup>1,2</sup> || hashmap || See [[Testopia:Documentation:XMLRPC:TestCaseRun#Attributes |attributes list]] modifiable fields.
|-
|}
 
<sup>1</sup> The notes attribute can be used to <b>append</b> a new note to the respective TestCaseRun.
 
<sup>2</sup> To automatically update an attached bug's status, set the new_values attribute, update_bugs, to 1.
 
=====Result=====
The modified TestCaseRun on success; on failure, an XmlRpcException is thrown.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call("TestCaseRun.update",
                          $run_id,
                          $case_id,
                          $build_id,
                          $environment_id,
                          {assignee => 1, caserun_status_id => 1, notes => 'Notes'});
 
 
----
====get_bugs - Get a list of bugs for the given TestCaseRun====
----
 
=====Usage=====
TestCaseRun.get_bugs
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| case_run_id || integer ||
|-
|}
 
 
=====Result=====
An array of Bug hash maps or a hash map containing values for the keys on success; on error, an XmlRpcException is thrown.
 
=====Example=====
<b>Perl</b>
my $caserun_id;
my $result = $proxy->call("TestCaseRun.get_bugs", $caserun_id);
 
 
 
----
====lookup_status_id_by_name - Lookup A TestCaseRun Status ID By Its Name====
----
 
=====Usage=====
TestCaseRun.lookup_status_id_by_name
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| name || string || Cannot be null or empty string
|-
|}
 
 
=====Result=====
The TestCaseRun status id for the respective name, empty string ('') if the name is not found.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestCaseRun.lookup_status_id_by_name', 'Name');
 
 
 
----
====lookup_status_name_by_id - Lookup A TestCaseRun Status Name By Its ID====
----
 
=====Usage=====
TestCaseRun.lookup_status_name_by_id
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| id || integer || Cannot be 0
|-
|}
 
 
=====Result=====
The TestCaseRun status name for the respective id or 0 error occurs.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestCaseRun.lookup_status_name_by_id', 1);
 
 
 
<br>Back to the [[Testopia |Testopia Main Page]]
141

edits