Updated on 2024-11-25 GMT+08:00

CodeArts TestPlan

The CodeArts TestPlan connector interconnects with Huawei Cloud CodeArts TestPlan.

CodeArts TestPlan is a one-stop cloud testing platform provided for software developers. It covers function and API tests and integrates the DevOps agile testing concepts, helping you improve management efficiency and deliver high-quality products.

Prerequisites

You have subscribed to CodeArts TestPlan.

Creating a CodeArts TestPlan Connection

  1. Log in to the new ROMA Connect console.
  2. In the navigation pane on the left, choose Connector. On the page displayed, click New Connection.
  3. Select the CodeArts TestPlan connector.
  4. In the dialog box displayed, configure the connector and click OK.

Parameter

Description

Name

Enter the connector instance name.

Description

Enter the description of the connector to identify it.

Access Key

Access key ID (AK) of the current account. Obtain the AK by referring to Access Keys. If an AK/SK pair has been generated, find the downloaded AK/SK file (such as credentials.csv).

Secret Access Key

Secret access key (SK) of the current account. Obtain the SK by referring to Access Keys. If an AK/SK pair has been generated, find the downloaded AK/SK file (such as credentials.csv).

Action

  • Calculating a custom report in real time
  • Querying the requirement tree of a test plan
  • Querying the operation history of a test plan
  • Obtaining the environment parameter list
  • Generating an API test suite by importing files from a repository
  • Adding test cases in batches to a plan
  • Querying the test plan list in a project (V2)
  • Creating a plan in a project
  • Querying the test plan list in a project
  • Obtaining test case details by case ID
  • Updating test case results in batches
  • Executing test cases in batches
  • Updating a test case in a custom test
  • Obtaining test case details
  • Deleting test cases in batches in a custom test
  • Creating a test case in a custom test
  • Deleting a registered service
  • Updating a registered service
  • Registering a new type of testing service
  • Obtaining the information about registered services of the user

Configuring Parameters

Table 1 Calculating a custom report in real time

Parameter

Description

project_id

CodeArts project ID.

plan_id

Branch/Plan ID.

region_id

Region ID.

name

Report name.

workpiece_type

Data type (test case: case; test suite: suite).

analysis_dim_row

Analysis dimension.

compare_dim_column

Comparison dimension.

creatorIds

Creator.

ownerIds

Owner.

ranks

Level.

releaseIds

Release ID.

status

Status.

moduleIds

Module ID.

results

Results.

labelIds

Tag.

startTime

Start time.

endTime

End time.

isAssociateIssue

Whether the test case is associated with a requirement.

Table 2 Querying the requirement tree of a test plan

Parameter

Description

project_id

CodeArts project ID.

plan_id

Test plan ID.

region_id

Region ID.

offset

Start offset.

limit

Number of items displayed on each page. A maximum of 200 items are supported.

Table 3 Querying the operation history of a test plan

Parameter

Description

project_id

CodeArts project ID.

plan_id

Test plan ID.

region_id

Region ID.

offset

Start offset.

limit

Number of items displayed on each page. A maximum of 200 items are supported.

Table 4 Obtaining the environment parameter list

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

offset

Start offset.

limit

Number of items displayed on each page. A maximum of 200 items are supported.

Table 5 Generating an API test suite by importing files from a repository

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

testsuite_name

Name of the test suite to be generated.

repository_id

Repository ID.

repository_branch

Repository branch.

file_path

Relative path of the YAML or JSON file in the repository. Only YAML and JSON files of Swagger 2.0 are supported.

Table 6 Adding test cases in batches to a plan

Parameter

Description

project_id

CodeArts project ID.

plan_id

Plan ID.

region_id

Region ID.

service_id

Service ID returned by the API for registering a test service.

testcase_id_list

Number of test cases contained in the plan. The array length is less than 50. Only one test type can be contained.

Table 7 Querying the test plan list in a project (V2)

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

offset

Start offset.

limit

Number of items displayed on each page. A maximum of 200 items are supported.

name

Test plan name for fuzzy search.

current_stage

Test plan stage (create, design, execute, or report).

Table 8 Creating a plan in a project

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

name

Plan name.

assigned_id

Processor ID.

service_id_list

Test case types contained in the plan. The array length is less than 10.

start_date

Plan start time, in UTC. Example: 2020-03-04

end_date

Plan end time, in UTC. Example: 2020-03-04

Table 9 Querying the test plan list in a project

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

name

Test plan name for fuzzy search.

current_stage

Test plan stage (create, design, execute, or report).

offset

Page number. The value ranges from 1 to 20000.

limit

Number of items displayed on each page. The value ranges from 1 to 200.

Table 10 Obtaining test case details by case ID

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

testcase_number

Test case ID.

Table 11 Updating test case results in batches

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

service_id

Service ID returned by the API for registering a test service.

testcase_id

Test case ID.

execute_id

Execution ID of the registered service.

result_id

Test case result. 0: successful, 1: failed, 5: executing, and 6: stopped.

end_time

Timestamp when case execution ends (mandatory when execution ends).

duration

Case execution duration, in milliseconds (mandatory when the status is updated).

description

Execution result remarks.

Table 12 Executing test cases in batches

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

service_id

Service ID returned by the API for registering a test service.

plan_id

Test plan ID.

testcase_id

Test case ID.

execute_id

Execution ID of the registered service.

result_id

Test case result. 0: successful, 1: failed, 5: executing, and 6: stopped.

start_time

Timestamp when case execution starts (mandatory when case execution starts).

Table 13 Updating a test case in a custom test

Parameter

Description

project_id

CodeArts project ID.

testcase_id

Test case ID.

region_id

Region ID.

name

Case name displayed on the page.

service_id

Service ID returned by the API for registering a test service.

rank_id

Test case level. Value options: 0, 1, 2 (default), 3, and 4.

testcase_number

Test case ID. If this parameter is left blank, the system automatically generates a case ID.

description

Test case description.

preparation

Prerequisites that must be met for executing the test case.

expect_result

Expected result of a test case.

test_step

Test step description.

label_list

Tag name list.

module_id

Module ID.

test_version_id

Test version number.

fix_version_id

Sprint number.

assigned_id

Processor ID.

issue_id

ID of the requirement associated with the case.

status_id

Test case status. 0: new; 5: designing; 6: testing; 7: completed.

defect_id_list

Bug IDs.

Table 14 Obtaining test case details

Parameter

Description

project_id

CodeArts project ID.

testcase_id

Test case ID.

region_id

Region ID.

Table 15 Deleting test cases in batches in a custom test

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

service_id

Service ID returned by the API for registering a test service.

test_case_id_list

Test case ID.

Table 16 Creating a test case in a custom test

Parameter

Description

project_id

CodeArts project ID.

region_id

Region ID.

name

Case name displayed on the page.

service_id

The value is returned by the registration API.

rank_id

Test case level. Value options: 0, 1, 2 (default), 3, and 4.

testcase_number

Test case ID. If this parameter is left blank, the system automatically generates a case ID.

description

Test case description.

preparation

Prerequisites that must be met for executing the test case.

expect_result

Expected result of a test case.

test_step

Test step description.

label_list

Tag name list.

module_id

Module ID.

test_version_id

Test version number.

fix_version_id

Sprint number.

assigned_id

Processor ID.

issue_id

ID of the requirement associated with the case.

Table 17 Deleting a registered service

Parameter

Description

service_id

Unique ID of a registered service. The value is returned by the registration API.

region_id

Region ID.

Table 18 Updating a registered service

Parameter

Description

service_id

Unique ID of a registered service. The value is returned by the registration API.

region_id

Region ID.

service_name

Test type name displayed on the GUI. The current reserved name cannot be used.

server_host

Domain name, which is used to call APIs. It must start with https or http and contain a maximum of 128 characters. TestHub uses the API under this domain name to keep the consistency between service data and user system data.

Table 19 Registering a new type of testing service

Parameter

Description

region_id

Region ID.

service_name

Test type name displayed on the GUI. The current reserved name cannot be used.

server_host

Domain name, which is used to call APIs. It must start with https or http and contain a maximum of 128 characters. TestHub uses the API under this domain name to keep the consistency between service data and user system data.

Table 20 Obtaining the information about registered services of the user

Parameter

Description

region_id

Region ID.