NAME
Testopia::Webservice::TestPlan
EXTENDS
Bugzilla::Webservice
DESCRIPTION
Provides methods for automated scripts to manipulate Testopia TestPlans
METHODS
add_tag
-
Description: Add one or more tags to the selected test plans. Params: $plan_ids - Integer/Array/String: An integer representing the ID of the plan in the database, an array of plan_ids, or a string of comma separated plan_ids. $tags - String/Array - A single tag, an array of tags, or a comma separated list of tags. Returns: Array: empty on success or an array of hashes with failure codes if a failure occurred.
create
-
Description: Creates a new Test Plan object and stores it in the database. Params: $values - Hash: A reference to a hash with keys and values matching the fields of the test plan to be created. +-------------------------+----------------+-----------+------------------------------------+ | Field | Type | Null | Description | +-------------------------+----------------+-----------+------------------------------------+ | product | Integer/String | Required | ID or Name of product | | name | String | Required | | | type | Integer/String | Required | ID or name of plan type | | default_product_version | String | Required | | | isactive | Boolean | Optional | 0: Archived 1: Active (Default 1) | +-------------------------+----------------+-----------+------------------------------------+ Returns: The newly created object hash.
get
-
Description: Used to load an existing test plan from the database. Params: $id - Integer/String: An integer representing the ID of this plan in the database Returns: Hash: A blessed Bugzilla::Extension::Testopia::TestPlan object hash
get_change_history
-
Description: Get the list of changes to the fields of this plan. Params: $id - Integer: An integer representing the ID of this plan in the database Returns: Array: An array of hashes with changed fields and their details.
get_product
-
Description: Get the Product the plan is associated with. Params: $id - Integer: An integer representing the ID of the plan in the database. Returns: Hash: A blessed Bugzilla::Extension::Testopia::Product hash.
get_tags
-
Description: Get the list of tags attached to this plan. Params: $id - Integer An integer representing the ID of this plan in the database Returns: Array: An array of tag object hashes.
get_test_cases
-
Description: Get the list of cases that this plan is linked to. Params: $id - Integer: An integer representing the ID of the plan in the database Returns: Array: An array of test case object hashes.
get_case_tags
-
Description: Get the list of tags associated with the cases that this plan is linked to. Params: $id - Integer: An integer representing the ID of the plan in the database Returns: Array: An array of tag object hashes.
get_test_runs
-
Description: Get the list of runs in this plan. Params: $id - Integer: An integer representing the ID of this plan in the database Returns: Array: An array of test run object hashes.
get_text
-
Description: The plan document for a given test plan. Params: $plan_id - Integer: An integer representing the ID of this plan in the database $version - Integer: (OPTIONAL) The version of the text you want returned. Defaults to the latest. Returns: Hash: Text and author information.
list
-
Description: Performs a search and returns the resulting list of test plans. Params: $query - Hash: keys must match valid search fields. +--------------------------------------------------------+ | Plan Search Parameters | +--------------------------------------------------------+ | Key | Valid Values | | author | A bugzilla login (email address) | | author_type | (select from email_variants) | | plan_id | comma separated integers | | plan_text | String | | plan_text_type | (select from query_variants) | | plan_type | String: Product Name | | product | String: Product Name | | product_id | Integer | | tags | String | | tags_type | (select from tag_variants) | | type_id | Integer | | version | String: Product version | +--------------------------------------------------------+ +--------------------------------------------------------+ | Paging and Sorting | +--------------------------------------------------------+ | Key | Description | | dir | "ASC" or "DESC" | | order | field to sort by | +--------------------------------------------------------+ | page_size | integer: how many per page | | page | integer: page number | | +++++++ OR +++++++ | | start | integer: Start with which record | | limit | integer: limit to how many | +--------------------------------------------------------+ | viewall | 1: returns all records 0: first 25 | +--------------------------------------------------------+ * The default is to only return 25 records at a time +----------------------------------------------------+ | query_variants | +----------------+-----------------------------------+ | Key | Description | | allwordssubstr | contains all of the words/strings | | anywordssubstr | contains any of the words/strings | | substring | contains the string | | casesubstring | contains the string (exact case) | | allwords | contains all of the words | | anywords | contains any of the words | | regexp | matches the regexp | | notregexp | doesn't match the regexp | +----------------+-----------------------------------+ +-------------------------------------+ | email_variants | +--------------+----------------------+ | Key | Description | | substring | contains | | exact | is | | regexp | matches regexp | | notregexp | doesn't match regexp | +--------------+----------------------+ +----------------------------------------------------+ | tag_variants | +----------------+-----------------------------------+ | Key | Description | | anyexact | is tagged with | | allwordssubstr | contains all of the words/strings | | anywordssubstr | contains any of the words/strings | | substring | contains the string | | casesubstring | contains the string (exact case) | | regexp | matches the regexp | | notregexp | doesn't match the regexp | | allwords | contains all of the words | | anywords | contains any of the words | | nowords | contains none of the words | +----------------------------------------------------+ Returns: Array: Matching test plans are returned in a list of plan object hashes.
list_count
-
Description: Performs a search and returns the resulting count of plans. Params: $query - Hash: keys must match valid search fields (see list). Returns: Integer - total matching plans.
- lookup_type_id_by_name
-
Params: $name - String: the plan type. Returns: Integer: ID of the plan type.
- lookup_type_name_by_id
-
Params: $id - Integer: ID of the plan type to return Returns: String: the type name.
remove_tag
-
Description: Remove a tag from a plan. Params: $plan_id - Integer: An integer or alias representing the ID of this plan in the database. $tag - String - A single tag to be removed. Returns: 0 on success.
store_text
-
Description: Update the document field of a plan. Params: $plan_id - Integer: An integer representing the ID of this plan in the database. $text - String: Text for the document. Can contain HTML. [$author_id] = Integer/String: (OPTIONAL) The numeric ID or the login of the author. Defaults to logged in user. Returns: Integer: The new text version
update
-
Description: Updates the fields of the selected test plan. Params: $id - Integer: A single TestPlan ID. $values - Hash of keys matching TestPlan fields and the new values to set each field to. +-------------------------+----------------+ | Field | Type | +-------------------------+----------------+ | id (readonly) | String | | name | String | | type | Integer/String | | default_product_version | String | | isactive | Boolean | +-------------------------+----------------+ Returns: Hash: The updated test plan object.
SEE ALSO
AUTHOR
Greg Hendricks <ghendricks@novell.com>