PUT /testcases/:id
Modify test case
| Name | Type | Required or Optional | Description | 
|---|---|---|---|
| Token | String | Required | Authentication credentials Token | 
Request body
| Name | Type | Required or Optional | Description | 
|---|---|---|---|
| branch | int | Optional | Affiliated branch | 
| module | int | Optional | Affiliated module | 
| Story | int | Optional | Affiliated story | 
| title | string | Optional | Case title | 
| type | string | Optional | Case type (feature: feature test | performance: performance test | config: configuration | install: installation | security: security related | interface: interface test | unit: unit test | other: others) | 
| stage | string | Optional | Adoptive stage (unittest: unit test stage | feature: feature test stage | integrate: integrate test stage | system: system test stage | smoke: smoke test stage | bvt: build verification test stage) | 
| precondition | string | Optional | Precondition | 
| pri | int | Optional | Priority | 
| steps | array | Optional | Case steps | 
| ∟ desc | string | Optional | Steps | 
| ∟ expect | string | Optional | Expectation | 
| keywords | string | Optional | Keywords | 
Request example
{
    "title": "case1",
    "pri": 1,
    "steps": [
        {
            "desc": "Step1",
            "expect": "Result1"
        }
    ],
    "type": "feature"
}
Request response
| Name | Type | Required or Optional | Description | 
|---|---|---|---|
| id | int | Required | Case ID | 
| product | int | Required | Affiliated product | 
| branch | int | Required | Affiliated branch | 
| module | int | Required | Affiliated module | 
| story | int | Required | Story related | 
| storyVersion | int | Required | strory version | 
| title | string | Required | story title | 
| precondition | string | Required | precondition | 
| pri | int | Required | priority | 
| type | string | Required | Case type (feature: feature test | performance: performance test | config: configuration | install: installation | security: security related | interface: interface test | unit: unit test | other: others) | 
| stage | string | Required | Adoptive stage (unittest: unit test stage | feature: feature test stage | integrate: integrate test stage | system: system test stage | smoke: smoke test stage | bvt: build verification test stage) | 
| steps | array | Required | Case steps list | 
| ∟ desc | string | Required | Steps | 
| ∟ expect | string | Required | Expectation | 
| fromBug | int | Optional | From bug | 
| fromCaseID | int | Optional | From use case | 
| openedBy | string | Required | Creator | 
| openedDate | datetime | Required | Create time | 
Response example
{
    "id": 9,
    "project": 0,
    "product": 1,
    "execution": 0,
    "branch": 0,
    "lib": 0,
    "module": 0,
    "path": 0,
    "story": 0,
    "storyVersion": 1,
    "title": "case1",
    "precondition": "",
    "keywords": "",
    "pri": 1,
    "type": "feature",
    "auto": "no",
    "frame": "",
    "stage": "",
    "howRun": "",
    "scriptedBy": "",
    "scriptedDate": null,
    "scriptStatus": "",
    "scriptLocation": "",
    "status": "normal",
    "subStatus": "",
    "color": "",
    "frequency": "1",
    "order": 0,
    "openedBy": {
        "id": 1,
        "account": "admin",
        "avatar": "",
        "realname": "Administrator"
    },
    "openedDate": "2021-11-29T07:24:42Z",
    "reviewedBy": null,
    "reviewedDate": null,
    "lastEditedBy": null,
    "lastEditedDate": null,
    "version": 1,
    "linkCase": "",
    "fromBug": 0,
    "fromCaseID": 0,
    "fromCaseVersion": 1,
    "deleted": false,
    "lastRunner": "",
    "lastRunDate": null,
    "lastRunResult": "",
    "toBugs": [],
    "steps": [
        {
            "id": 6,
            "parent": 0,
            "case": 9,
            "version": 1,
            "type": "step",
            "desc": "Step1",
            "expect": "Result1"
        }
    ],
    "files": [],
    "currentVersion": 1,
    "caseFails": 0
}