Testopia:Documentation:XMLRPC:Environment
Back to XML-RPC_API Objects
Environment
Description
Environments are a set of parameters dictating what conditions a test was conducted in. Each test run must have an environment.
Hiearchy
Bugzilla::WebService::Testopia::Environment
Attributes
| Attribute | Data Type | Comments | Create | Read | Update |
| environment_id | integer | X | |||
| isactive | integer | Required | X | X | |
| name | string | Optional | X | X | |
| product_id | integer | Required | X | X |
Methods
get - Get An Environment by ID
Usage
Environment.get
Parameters
| Parameter | Data Type | Comments |
| environment_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 $environment_id = 1;
my $result = $proxy->call('Environment.get', $environment_id);
list - Get A List of Environments Based on A Query
Usage
Environment.list
Parameters
| Parameter | Data Type | Comments |
| query | hashmap | Can not be null. See Query Examples. |
Result
An array of Environment hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
my $result = $proxy->call('Environment.list', {'product_id' => 1, 'isactive' => 1});
create - Create A New Environment
Usage
Environment.create
Parameters
| Parameter | Data Type | Comments |
| new_values | hashmap | See required attributes list1 below. |
1 Required attributes: isactive and product_id
Result
An integer value representing the new environment_id or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
my $result = $proxy->call('Environment.create', {'product_id' => 1, 'isactive' => 1});
update - Update An Existing Environment
Usage
Environment.update
Parameters
| Parameter | Data Type | Comments |
| environment_id | integer | |
| new_values | hashmap | environment_id can not be modified. |
Result
The modified environment on success or a hash map containing values for the keys, "faultcode" and "faultstring".
Example
Perl
my $environment_id = 1;
my $result = $proxy->call('Build.update', $environment_id, {'name' => 'Updated Environment Name'});
get_runs - Get A List of TestRuns For An Existing Environment
Usage
Environment.get_runs
Parameters
| Parameter | Data Type | Comments |
| environment_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 $environment_id = 1;
my $result = $proxy->call('Environment.get_runs', $environment_id);
Back to Testopia