Testopia:Documentation:XMLRPC:TestRun
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