Testopia:Documentation:XMLRPC:TestPlan
Back to Testopia XML-RPC API
TestPlan
Description
The test plan is the glue of Testopia. Virtually all other objects associate to a plan.
Hiearchy
Bugzilla::WebService::Testopia::TestPlan
Attributes
| Attribute | Data Type | Comments | Create | Read | Update |
| author_id | integer | Required | X | ||
| default_product_version | string | Required | X | X | |
| creation_date | string | Format: yyyy-mm-dd hh:mm:ss | X | ||
| isactive | integer | Optional | X | X | |
| name | string | Required | X | X | |
| plan_id | integer | X | |||
| product_id | integer | Required | X | X | |
| type_id | integer | Required | X | X |
Methods
get - Get A TestPlan by ID
Usage
TestPlan.get
Parameters
| Parameter | Data Type | Comments |
| plan_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
Java
ArrayList<Object> params = new ArrayList<Object>();
params.add(plan_id);
Object[] result = (Object[]) client.execute("TestPlan.get", params);
Perl
my $plan_id = 1;
my $result = $proxy->call("TestPlan.get", $plan_id);
list - Get A List of TestPlans Based on A Query
Usage
TestPlan.list
Parameters
| Parameter | Data Type | Comments |
| query | hashmap | Can not be null. See Query Examples. |
Result
An array of TestPlan hash maps or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $result = $proxy->call("TestPlan.list", {"author_id" => 1, "product_id" => 1});
create - Create A New TestPlan
Usage
TestPlan.create
Parameters
| Parameter | Data Type | Comments |
| new_values | hashmap | See required attributes list1 below. |
1 Required attributes: author_id, product_id, default_product_version, type_id, and name.
Result
An integer value representing the new plan_id or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $result = $proxy->call("TestPlan.create", {name => "New Plan", product_id => 1, author_id => 2, type_id => 2, default_product_version => "1.0"});
update - Update An Existing TestPlan
Usage
TestPlan.update
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer | |
| new_values | hashmap | plan_id, author_id, and creation_date can not be modified. |
Result
The modified TestPlan on success or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.update", $plan_id, {name => "Updated Plan Name", isactive => 1});
get_categories - Get A List of Categories For An Existing Test Plan
Usage
TestPlan.get_categories
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of Category objects on success or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_categories", $plan_id);
get_builds - Get A List of Builds For An Existing Test Plan
Usage
TestPlan.get_builds
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of Build 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(PlanID);
Object[] result = (Object[]) client.execute("TestPlan.get_builds", params);
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_builds", $plan_id);
get_components - Get A List of Components For An Existing Test Plan
Usage
TestPlan.get_components
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of Component 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(plan_id);
Object[] result = (Object[]) client.execute("TestPlan.get_components", params);
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_components", $plan_id);
get_test_cases - Get A List of Test Cases For An Existing Test Plan
Usage
TestPlan.get_test_cases
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of TestCase objects on success or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_test_cases", $plan_id);
get_test_runs - Get A List of Test Runs For An Existing Test Plan
Usage
TestPlan.get_test_runs
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of TestRun objects on success or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_test_runs", $plan_id);
add_tag - Add a tag to the given TestPlan
Usage
TestPlan.add_tag
Parameters
| Parameter | Data Type | Comments |
| plan_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(testPlan_id);
params.add(tag_name);
Integer result = (Integer)client.execute("TestPlan.add_tag", params);
Perl
my $plan_id = 2;
my $tag_name = "New Tag Name";
my $result = $proxy->call("TestPlan.add_tag", $plan_id, $tag_name);
remove_tag - Remove a tag from the given TestPlan
Usage
TestPlan.remove_tag
Parameters
| Parameter | Data Type | Comments |
| plan_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 $plan_id = 2;
my $tag_name = "Tag Name";
my $result = $proxy->call("TestPlan.remove_tag", $plan_id, $tag_name);
get_tags - Get a list of tags for the given TestPlan
Usage
TestPlan.get_tags
Parameters
| Parameter | Data Type | Comments |
| plan_id | integer |
Result
An array of Tag hash maps or a hash map containing values for the keys, "faultCode" and "faultString".
Example
Perl
my $plan_id = 2;
my $result = $proxy->call("TestPlan.get_tags", $plan_id);
lookup_type_id_by_name - Lookup A TestPlan Type ID By Its Name
Usage
TestPlan.lookup_type_id_by_name
Parameters
| Parameter | Data Type | Comments |
| name | string | Cannot be null or empty string |
Result
The TestPlan type id for the respective name or 0 if an error occurs.
Example
Perl
my $type_name = "Unit";
my $result = $proxy->call('TestPlan.lookup_type_id_by_name', $type_name);
lookup_type_name_by_id - Lookup A TestPlan Type Name By Its ID
Usage
TestPlan.lookup_type_name_by_id
Parameters
| Parameter | Data Type | Comments |
| id | integer | Cannot be 0 |
Result
The TestPlan type name for the respective id or empty string if an error occurs.
Example
Perl
my $type_id = 1;
my $result = $proxy->call('TestPlan.lookup_type_name_by_id', $type_id);
Back to the Testopia Main Page