Testopia:Documentation:XMLRPC:TestRun: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Replacing page with ' see http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/TestRun.html')
 
Line 1: Line 1:
__NOEDITSECTION__
  see http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/TestRun.html
Back to [[Testopia:Documentation:XMLRPC |Testopia XML-RPC API]]
 
==TestRun==
 
===Description===
A test run is the place where most of the work of testing is done.
 
A run is associated with a single test plan and multiple test cases through the test case-runs.
 
===Hiearchy===
Bugzilla::WebService::Testopia::TestRun
 
===Attributes===
 
{| border=1 cellpadding=4
| '''Attribute''' || '''Data Type''' || '''Comments''' || '''Creation''' || '''Read''' || '''Update'''
|-
| build_id || integer || || Required || X || X
|-
| environment_id || integer || || Required || X || X
|-
| manager_id || integer || || Required || X || X
|-
| notes || string || || Optional || X || X
|-
| plan || TestPlan hashmap ||  || || X ||
|-
| plan_id || integer || || Required || X ||
|-
| plan_text_version || integer || || Required || X || X
|-
| product_version || integer || || Optional || X || X
|-
| run_id || integer || || || X ||
|-
| start_date || string || Format: yyyy-mm-dd hh:mm:ss || || X ||
|-
| stop_date || string || Format: yyyy-mm-dd hh:mm:ss || || X ||
|-
| summary || string || || Required || X || X
|-
|}
 
 
===Methods===
 
----
====get - Get A TestRun by ID====
----
 
=====Usage=====
TestRun.get
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| 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=====
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.get', $run_id);
 
----
 
====list - Get A List of TestRuns Based on A Query====
----
 
=====Usage=====
TestRun.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 TestRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestRun.list', {build_id => 1, environment_id => 1});
 
----
====create - Create A New TestRun====
----
 
=====Usage=====
TestRun.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: build_id, environment_id, manager_id, plan_id, plan_text_version, and summary.
 
 
=====Result=====
An integer value representing the new run_id or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestRun.create', {build_id => 1, environment_id => 1, manager_id => 1, plan_id => 1, plan_text_version => 1, summary => 'Summary'});
 
 
----
====update - Update An Existing TestRun====
----
 
=====Usage=====
TestRun.update
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
| new_values || hashmap || plan_id can not be modified.
|-
|}
 
 
=====Result=====
The modified TestRun on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.update', $run_id, {notes => 'New Note'});
 
----
====get_test_cases - Get A List of TestCases For An Existing Test Run====
----
 
=====Usage=====
TestRun.get_test_cases
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
|}
 
 
=====Result=====
An array of TestCase objects on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Java</b>
ArrayList<Object> params = new ArrayList<Object>();
params.add(RunID);
Object[] result = (Object[]) client.execute("TestRun.get_test_cases", params);
 
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.get_test_cases', $run_id);
 
 
----
====get_test_case_runs - Get A List of TestCase Runs For An Existing Test Run====
----
 
=====Usage=====
TestRun.get_test_case_runs
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
|}
 
 
=====Result=====
An array of TestCaseRun objects on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.get_test_case_runs', $run_id);
 
 
 
----
====get_test_plan - Get A TestPlan For An Existing Test Run====
----
 
=====Usage=====
TestRun.get_test_plan
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
|}
 
 
=====Result=====
A TestPlan object on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.get_test_plan', $run_id);
 
 
 
----
====add_tag - Add a tag to the given TestRun====
----
 
=====Usage=====
TestRun.add_tag
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
| tag_name || string || Creates tag if it does not exist
|-
|}
 
 
=====Result=====
The integer , 0, on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Java</b>
ArrayList<Object> params = new ArrayList<Object>();
params.add(testRun_id);
params.add(tag_name);
Integer result = (Integer)client.execute("TestRun.add_tag", params);
 
<b>Perl</b>
my $run_id = 1;
my $tag_name = 'Name';
my $result = $proxy->call('TestRun.add_tag', $run_id, $tag_name);
 
----
====remove_tag - Remove a tag from the given TestRun====
----
 
=====Usage=====
TestRun.remove_tag
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
| tag_name || string ||
|-
|}
 
 
=====Result=====
The integer , 0, on success or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $run_id = 1;
my $tag_name = 'Name';
my $result = $proxy->call('TestRun.remove_tag', $run_id, $tag_name);
 
----
====get_tags - Get a list of tags for the given TestRun====
----
 
=====Usage=====
TestRun.get_tags
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| run_id || integer ||
|-
|}
 
 
=====Result=====
An array of Tag hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
 
=====Example=====
<b>Perl</b>
my $run_id = 1;
my $result = $proxy->call('TestRun.get_tags', $run_id);
 
 
----
====lookup_environment_id_by_name - Lookup A TestRun Environment ID By Its Name====
----
 
=====Usage=====
TestRun.lookup_environment_id_by_name
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| name || string || Cannot be null or empty string
|-
|}
 
 
=====Result=====
The TestRun environment id for the respective name or 0 if an error occurs.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestRun.lookup_environment_id_by_name', 'Name');
 
 
 
----
====lookup_environment_name_by_id - Lookup A TestRun Environment Name By Its ID====
----
 
=====Usage=====
TestRun.lookup_environment_name_by_id
 
=====Parameters=====
{| border=1 cellpadding=4
| '''Parameter''' || '''Data Type''' || '''Comments'''
|-
| id || integer || Cannot be 0
|-
|}
 
 
=====Result=====
The TestRun environment name for the respective id or empty string if an error occurs.
 
=====Example=====
<b>Perl</b>
my $result = $proxy->call('TestRun.lookup_environment_name_by_id', 1);
 
 
 
<br>Back to the [[Testopia |Testopia Main Page]]

Latest revision as of 17:09, 23 June 2008