Testopia:Documentation:XMLRPC:TestCaseRun: Difference between revisions
Lunderbolt (talk | contribs) (case_run to case_run_id - parameter for TestCaseRun.get) |
Ghendricks (talk | contribs) No edit summary |
||
| Line 5: | Line 5: | ||
===Description=== | ===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 | 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. | 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. | ||
| Line 14: | Line 14: | ||
{| border=1 cellpadding=4 | {| border=1 cellpadding=4 | ||
| '''Attribute''' || '''Data Type''' || '''Comments''' | | '''Attribute''' || '''Data Type''' || '''Comments''' || '''Create''' || '''Read''' || '''Update''' | ||
|- | |- | ||
| assignee || | | assignee || integer || ID value || Required || X || X | ||
|- | |- | ||
| build_id || integer || | | 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 || | | iscurrent || integer || || || X || | ||
|- | |- | ||
| notes || string || | | notes || string || || Optional || X || X | ||
|- | |- | ||
| run_id || integer || | | run_id || integer || || Required || X || | ||
|- | |- | ||
| sortkey || | | sortkey || integer || || || X || | ||
|- | |- | ||
| testedby || | | testedby || integer || ID value || || X || | ||
|- | |- | ||
|} | |} | ||
| Line 64: | Line 68: | ||
A hash map of key/value pairs for the attributes listed above or a hash map containing values for the keys, "faultcode" and "faultstring". | A hash map of key/value pairs for the attributes listed above or a hash map containing values for the keys, "faultcode" and "faultstring". | ||
=====Example===== | |||
<b>Perl</b> | |||
my $caserun_id = 1; | |||
my $result = $proxy->call("TestCaseRun.get", $caserun_id); | |||
| Line 78: | Line 86: | ||
| '''Parameter''' || '''Data Type''' || '''Comments''' | | '''Parameter''' || '''Data Type''' || '''Comments''' | ||
|- | |- | ||
| query || | | query || hashmap || Can not be null. See [[Bugzilla_XML-RPC_API_Query_Examples |Query Examples]]. | ||
|- | |- | ||
|} | |} | ||
| Line 85: | Line 93: | ||
=====Result===== | =====Result===== | ||
An array of TestCaseRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring". | An array of TestCaseRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring". | ||
=====Example===== | |||
<b>Perl</b> | |||
my $result = $proxy->call("TestCaseRun.list", {build_id => 1, case_id => 1}); | |||
| Line 102: | Line 114: | ||
|} | |} | ||
<sup>1</sup> Required attributes: assignee, build_id, case_id, case_text_version, and run_id | <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 | |||
| Line 108: | Line 122: | ||
An integer value representing the new test case run id or a hash map containing values for the keys, "faultcode" and "faultstring". | An integer value representing the new test case run id or a hash map containing values for the keys, "faultcode" and "faultstring". | ||
=====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}); | |||
| Line 123: | Line 140: | ||
| run_id || integer || | | run_id || integer || | ||
|- | |- | ||
| case_id || integer || | |||
|- | |- | ||
| case_id || integer || | | build_id || integer || | ||
|- | |||
| environment_id || integer || | |||
|- | |||
| new_values<sup>1,2</sup> || hashmap || See [[Bugzilla_XML-RPC_API_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 or a hash map containing values for the keys, "faultcode" and "faultstring". | |||
=====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, "faultcode" and "faultstring". | |||
=====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 or 0 if an error occurs. | |||
=====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 | ||
|- | |- | ||
|} | |} | ||
| Line 136: | Line 235: | ||
=====Result===== | =====Result===== | ||
The | The TestCaseRun status name for the respective id or empty string if an 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]] | <br>Back to the [[Testopia |Testopia Main Page]] | ||
Revision as of 21:01, 25 September 2007
Back to 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
| 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
| 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 or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
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
| Parameter | Data Type | Comments |
| query | hashmap | Can not be null. See Query Examples. |
Result
An array of TestCaseRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
my $result = $proxy->call("TestCaseRun.list", {build_id => 1, case_id => 1});
create - Create A New TestCaseRun
Usage
TestCaseRun.create
Parameters
| Parameter | Data Type | Comments |
| new_values | hashmap | See required attributes list1 below. |
1 Required attributes: assignee, build_id, case_id, case_text_version, environment_id, and run_id
2 case_run_status_id always set to 1 (IDLE) on create
Result
An integer value representing the new test case run id or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
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
| Parameter | Data Type | Comments |
| run_id | integer | |
| case_id | integer | |
| build_id | integer | |
| environment_id | integer | |
| new_values1,2 | hashmap | See attributes list modifiable fields. |
1 The notes attribute can be used to append a new note to the respective TestCaseRun.
2 To automatically update an attached bug's status, set the new_values attribute, update_bugs, to 1.
Result
The modified TestCaseRun on success or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
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
| Parameter | Data Type | Comments |
| case_run_id | integer |
Result
An array of Bug hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
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
| Parameter | Data Type | Comments |
| name | string | Cannot be null or empty string |
Result
The TestCaseRun status id for the respective name or 0 if an error occurs.
Example
Perl
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
| Parameter | Data Type | Comments |
| id | integer | Cannot be 0 |
Result
The TestCaseRun status name for the respective id or empty string if an error occurs.
Example
Perl
my $result = $proxy->call('TestCaseRun.lookup_status_name_by_id', 1);
Back to the Testopia Main Page