POST
/products/:id/testcases
Create the Use Case
1. Request Header
Name | Type | Required | Description |
---|---|---|---|
Token | String | Yes | Authentication Token |
2. Request Payload
Name | Type | Required | Description |
---|---|---|---|
branch | int | No | Affiliated Branch |
module | int | No | Affiliated Module |
story | int | No | Affiliated Story |
title | string | Yes | Use Case Title |
type | string | Yes |
Case Type (feature test | performance test | config | install | security | interface test | unit test | others) |
stage | string | No |
Adoptive Stage (unit test stage | feature test stage | integrate test stage | system test stage | smoke test stage | build verification test stage) |
precondition | string | No | Precondition |
pri | int | No | Priority |
steps | array | Yes | Case Steps |
∟ desc | string | Yes | Steps |
∟ expect | string | Yes | Expectation |
keywords | string | No | Keywords |
3. Request Example
{
"title": "case1",
"pri": 1,
"steps": [
{
"desc": "step 1",
"expect": "result 1"
}
],
"type": "feature"
}
4. Request Response
Name | Type | Required | Description |
---|---|---|---|
id | int | Yes | Use Case ID |
product | int | Yes | Affiliated Product |
branch | int | Yes | Affiliated Branch |
module | int | Yes | Affiliated Module |
story | int | Yes | Related Stories |
storyVersion | int | Yes | Story Version |
title | string | Yes | Story Title |
precondition | string | Yes | Precondition |
pri | int | Yes | Priority |
type | string | Yes |
Case Type (feature test | performance test | config | install | security | interface test | unit test | others) |
stage | string | Yes |
Adoptive Stage (unit test stage | feature test stage | integrate test stage | system test stage | smoke test stage | build verification test stage) |
steps | array | Yes | List of Use Case Steps |
∟ desc | string | Yes | Steps |
∟ expect | string | Yes | Expectation |
fromBug | int | No | From the Bug |
fromCaseID | int | No | From the Use Case |
openedBy | string | Yes | Created by |
openedDate | datetime | Yes | Created at |
5. Response Example
{
"id": 8,
"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": "admin",
"openedDate": "2021-11-29T07:18:29Z",
"reviewedBy": "",
"reviewedDate": null,
"lastEditedBy": "",
"lastEditedDate": null,
"version": 1,
"linkCase": "",
"fromBug": 0,
"fromCaseID": 0,
"fromCaseVersion": 1,
"deleted": false,
"lastRunner": "",
"lastRunDate": null,
"lastRunResult": "",
"toBugs": [],
"steps": [
{
"id": 5,
"parent": 0,
"case": 8,
"version": 1,
"type": "step",
"desc": "step 1",
"expect": "result 1"
}
],
"files": [],
"currentVersion": 1
}