获取产品用例列表 分享链接

作者:王怡栋 最后编辑:宋辰轩 于 2022-10-28 09:38:39 浏览量:5218
GET
/products/:id/testcases

获取产品用例列表

请求头

名称类型必填描述
TokenString认证凭证Token

请求响应

名称类型必填描述
pageint当前页数
totalint用例总数
limitint每页用例数
testcasesarray用例列表
  ∟  idint用例ID
  ∟  productint所属产品
  ∟  branchint所属分支
  ∟  moduleint所有模块
  ∟  storyint相关研发需求
  ∟  storyVersionint需求版本
  ∟  titlestring用例标题
  ∟  preconditionstring前置条件
  ∟  keywordsstring关键词
  ∟  priint优先级
  ∟  typestring用例类型(feature 功能测试 | performance 性能测试 | config 配置相关 | install 安装部署 | security 安全相关 | interface 接口测试 | unit 单元测试 | other 其他)
  ∟  stagestring适用阶段(unittest 单元测试阶段 | feature 功能测试阶段 | intergrate 集成测试阶段 | system 系统测试阶段 | smoke 冒烟测试阶段 | bvt 版本验证阶段)
  ∟  statusstring状态(wait 待评审 | normal 正常 | blocked 被阻塞 | investigate 研究中)
  ∟  openedBy创建人
  ∟  openedDatedatetime创建时间
  ∟  fromBugint来自于Bug
  ∟  fromCaseIDint来自于用例

响应示例

{
    "page": 1,
    "total": 6,
    "limit": 20,
    "testcases": [
        {
            "id": 10,
            "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": "管理员"
            },
            "openedDate": "2021-12-05T15:05:16Z",
            "reviewedBy": null,
            "reviewedDate": null,
            "lastEditedBy": null,
            "lastEditedDate": null,
            "version": 1,
            "linkCase": "",
            "fromBug": 0,
            "fromCaseID": 0,
            "fromCaseVersion": 1,
            "deleted": false,
            "lastRunner": "",
            "lastRunDate": null,
            "lastRunResult": "",
            "storyTitle": null,
            "needconfirm": false,
            "bugs": 0,
            "results": 0,
            "caseFails": 0,
            "stepNumber": 1,
            "statusName": "正常"
        }
    ]
}