GetTestResultList

Updated at:

Retrieves a list of test cases in a test plan with support for conditional filtering.

Operation description

Retrieves a list of test cases in a test plan. Supports conditional filtering by using the condition field.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /organization/{organizationId}/testhub/testplan/{testPlanIdentifier}/testresults HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The enterprise ID.

5ebbc0228123212b59xxxxx

testPlanIdentifier

string

Yes

The test plan ID, which is the unique identifier of the test plan.

592531xxxxxx15f2e98dbc7e27

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

directoryIdentifier

string

Yes

The unique identifier of the folder, which is the ID of the corresponding folder in the test plan.

e27b8eace6501ce51cf5d56784

conditions

string

No

The filter conditions.

{'conditionGroups': [[{'fieldIdentifier': 'gmtModified', 'operator': 'MORE_THAN_AND_EQUAL', 'value': ['2023-04-20 18:03:12.442140'], 'className': 'dateTime', 'format': 'input'}]]}

Response elements

Element

Type

Description

Example

object

requestId

string

The request ID. Each request has a unique value to facilitate subsequent troubleshooting.

ASSDS-ASSASX-XSAXSA-XSAXSAXS

errorMsg

string

The error message.

error

errorCode

string

The error code.

Openapi.RequestError

success

boolean

Indicates whether the request is successful.

true

testResult

array<object>

The work item information.

array<object>

The test result content.

testResultIdentifier

string

The test result ID.

a8bxxxxxxxxxxxxxxxx54

testResultStatus

string

The test result status.

TO DO

testResultExecutor

object

The test plan executor object.

executorIdentifier

string

The unique identifier of the executor, which is the Aliyun PK.

1243xxxxx234xx

name

string

The name of the executor.

User name

testResultGmtCreate

integer

The time when the test result was generated.

1621578648000

testcaseIdentifier

string

The test case ID, which is the unique identifier of the test case.

943d20fe5e385a08fdd6b593fb

bugCount

integer

The number of bugs associated with the test execution result.

8

subject

string

The test case title.

Test work item

assignedTo

object

The assignee information.

assignedToIdenttifier

string

The assignee ID, which is the unique identifier of the assignee.

1243xxxxx234xx

name

string

The name of the assignee.

User name

spaceIdentifier

string

The ID of the test library to which the test case belongs.

592531647d7b15f2e98dbc7e27

categoryIdentifier

string

The type ID of the test case.

Req

gmtCreate

integer

The time when the test case was created.

1621578648000

customFields

array<object>

The custom field array.

object

The field value used for writing.

fieldIdentifier

string

The field ID, which is the unique identifier of the custom field.

943d20fe5e385a08fdd6b593fb

value

string

The custom field value.

d7f112f9d023e2108fa1b0d8

fieldFormat

string

The custom field format.

Input

fieldClassName

string

The custom field type.

User

Examples

Success response

JSON format

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMsg": "error",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "testResult": [
    {
      "testResultIdentifier": "a8bxxxxxxxxxxxxxxxx54",
      "testResultStatus": "TO DO",
      "testResultExecutor": {
        "executorIdentifier": "1243xxxxx234xx",
        "name": "人员名称"
      },
      "testResultGmtCreate": 1621578648000,
      "testcaseIdentifier": "943d20fe5e385a08fdd6b593fb",
      "bugCount": 8,
      "subject": "测试工作项",
      "assignedTo": {
        "assignedToIdenttifier": "1243xxxxx234xx",
        "name": "人员名称"
      },
      "spaceIdentifier": "592531647d7b15f2e98dbc7e27",
      "categoryIdentifier": "Req",
      "gmtCreate": 1621578648000,
      "customFields": [
        {
          "fieldIdentifier": "943d20fe5e385a08fdd6b593fb",
          "value": "d7f112f9d023e2108fa1b0d8",
          "fieldFormat": "Input",
          "fieldClassName": "User"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Openapi.RequestError request error
403 Operate.NoPermission NoPermission You are not authorized to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.