You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet

Creating a test case tracker item

Collect the test step field ids

First you need to check your test case tracker configuration in order to find out the custom field ids according to test steps. All other fields can be filled as they are described here.


Request:

GET /v2/tracker/{testCaseTrackerId}/field

Response:

...
  {
    "id": 1000000,
    "name": "Test Steps",
    "type": "TableField",
    "hidden": false,
    "columns": [
      {
        "id": 1000001,
        "name": "Action",
        "type": "WikiTextField",
        "hidden": false
      },
      {
        "id": 1000002,
        "name": "Expected result",
        "type": "WikiTextField",
        "hidden": false
      },
      {
        "id": 1000003,
        "name": "Critical",
        "type": "BoolField",
        "hidden": false
      },
      {
        "id": 1000004,
        "name": "Id",
        "type": "WikiTextField",
        "hidden": true
      }
    ]
  }
...

Create the test case tracker item

From the response you can find the ids of the test step fields and use them to compose you test case creation request.


Request:

POST /v2/tracker/{testCaseTrackerId}/item

Request body:

{
    "name": "My first Test Case",
    "description": "My test case",
    "descriptionFormat": "PlainText",
    "status": {
        "value": 1,
        "fieldId": 7,
        "type": "SingleOptionChoiceFieldValue"
    },
    "tableValues": [
        {
            "rows": [
                {
                    "fieldValues": [
                        {
                            "value": "First action",
                            "fieldId": 1000001,
                            "type": "WikiTextFieldValue"
                        },
                        {
                            "value": "First expected result",
                            "fieldId": 1000002,
                            "type": "WikiTextFieldValue"
                        },
                        {
                            "value": false,
                            "fieldId": 1000003,
                            "type": "BoolFieldValue"
                        }
                    ]
                },
                {
                    "fieldValues": [
                        {
                            "value": "Second action",
                            "fieldId": 1000001,
                            "type": "WikiTextFieldValue"
                        },
                        {
                            "value": "Second expected result",
                            "fieldId": 1000002,
                            "type": "WikiTextFieldValue"
                        },
                        {
                            "value": false,
                            "fieldId": 1000003,
                            "type": "BoolFieldValue"
                        }
                    ]
                }
            ],
            "fieldId": 1000000,
            "type": "TrackerItemTableFieldValue"
        }
    ]
}

Please note that all the test steps are considered as one table field, so at the moment (in codeBeamer 9.5) there isn't any way to just update one step directly.