Testopia:Documentation:XMLRPC:TestRun: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:


{| border=1 cellpadding=4
{| border=1 cellpadding=4
| '''Attribute''' || '''Data Type''' || '''Comments'''  
| '''Attribute''' || '''Data Type''' || '''Comments''' || '''Creation''' || '''Read''' || '''Update'''
|-
|-
| build_id || integer ||
| build_id || integer || || Required || X || X
|-
|-
| environment || string ||
| environment_id || integer || || Required || X || X
|-
|-
| manager || string ||
| manager_id || integer || || Required || X || X
|-
|-
| notes || string ||
| notes || string || || Optional || X || X
|-
|-
| plan_id || integer ||
| plan || TestPlan hashmap ||  || || X ||  
|-
|-
| plan_text_version || string ||
| plan_id || integer || || Required || X ||  
|-
|-
| product_version || string ||
| plan_text_version || integer || || Required || X || X
|-
|-
| run_id || integer ||
| product_version || integer || || Optional || X || X
|-
| run_id || integer || || || X ||  
|-
|-
| start_date || string || Format: yyyy-mm-dd hh:mm:ss
| start_date || string || Format: yyyy-mm-dd hh:mm:ss || || X ||
|-
|-
| stop_date || string || Format: yyyy-mm-dd hh:mm:ss
| stop_date || string || Format: yyyy-mm-dd hh:mm:ss || || X ||
|-
|-
| summary || string ||
| summary || string || || Required || X || X
|-
|-
|}
|}
Line 63: Line 65:
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 $run_id = 1;
my $result = $proxy->call('TestRun.get', $run_id);


----
----
Line 77: Line 82:
| '''Parameter''' || '''Data Type''' || '''Comments'''  
| '''Parameter''' || '''Data Type''' || '''Comments'''  
|-
|-
| query || string || Can not be null or an empty string.  See [[Bugzilla_XML-RPC_API_Query_Examples |Query Examples]].
| query || hashmap || Can not be null.  See [[Bugzilla_XML-RPC_API_Query_Examples |Query Examples]].
|-
|-
|}
|}
Line 85: Line 90:
An array of TestRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
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});


----
----
Line 101: Line 109:
|}
|}


<sup>1</sup> Required attributes: build_id, environment, manager, plan_id, plan_text_version, and summary.
<sup>1</sup> Required attributes: build_id, environment_id, manager_id, plan_id, plan_text_version, and summary.




Line 107: Line 115:
An integer value representing the new run_id or a hash map containing values for the keys, "faultcode" and "faultstring".
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'});




Line 128: Line 139:


=====Result=====
=====Result=====
The integer value, 0, on success or a hash map containing values for the keys, "faultcode" and "faultstring".
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]]
<br>Back to the [[Testopia |Testopia Main Page]]

Revision as of 20:59, 25 September 2007

Back to 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

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
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

Perl

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
Parameter Data Type Comments
query hashmap Can not be null. See Query Examples.


Result

An array of TestRun hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".

Example

Perl

my $result = $proxy->call('TestRun.list', {build_id => 1, environment_id => 1});

create - Create A New TestRun


Usage

TestRun.create

Parameters
Parameter Data Type Comments
new_values hashmap See required attributes list1 below.

1 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

Perl

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
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

Perl

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
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

Java

ArrayList<Object> params = new ArrayList<Object>();
params.add(RunID);
Object[] result = (Object[]) client.execute("TestRun.get_test_cases", params);

Perl

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
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

Perl

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
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

Perl

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
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

Java

ArrayList<Object> params = new ArrayList<Object>();
params.add(testRun_id);
params.add(tag_name);
Integer result = (Integer)client.execute("TestRun.add_tag", params);

Perl

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
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

Perl

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
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

Perl

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
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

Perl

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
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

Perl

my $result = $proxy->call('TestRun.lookup_environment_name_by_id', 1);



Back to the Testopia Main Page