|
|
| Line 1: |
Line 1: |
| __NOEDITSECTION__
| | see [http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/Environment.html http://landfill.bugzilla.org/testopia2/docs/html/api/Bugzilla/WebService/Testopia/Environment.html] |
| Back to [[Testopia:Documentation:XMLRPC#Objects |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===
| |
| | |
| {| border=1 cellpadding=4
| |
| | '''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=====
| |
| {| border=1 cellpadding=4
| |
| | '''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=====
| |
| <b>Perl</b>
| |
| 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=====
| |
| {| 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 Environment hash maps or a hash map containing values for the keys, "faultcode" and "faultstring".
| |
| | |
| =====Example=====
| |
| <b>Perl</b>
| |
| my $result = $proxy->call('Environment.list', {'product_id' => 1, 'isactive' => 1});
| |
| | |
| | |
| ----
| |
| ====create - Create A New Environment====
| |
| ----
| |
| | |
| =====Usage=====
| |
| Environment.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: 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=====
| |
| <b>Perl</b>
| |
| my $result = $proxy->call('Environment.create', {'product_id' => 1, 'isactive' => 1});
| |
| | |
| | |
| ----
| |
| ====update - Update An Existing Environment====
| |
| ----
| |
| | |
| =====Usage=====
| |
| Environment.update
| |
| | |
| =====Parameters=====
| |
| {| border=1 cellpadding=4
| |
| | '''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=====
| |
| <b>Perl</b>
| |
| 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=====
| |
| {| border=1 cellpadding=4
| |
| | '''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=====
| |
| <b>Perl</b>
| |
| my $environment_id = 1;
| |
| my $result = $proxy->call('Environment.get_runs', $environment_id);
| |
| | |
| <br>Back to [[Testopia]]
| |