修改用例 分享链接

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

修改用例

请求头

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

请求体

名称类型必填描述
branchint所属分支
moduleint所属模块
storyint所属需求
titlestring用例标题
typestring用例类型(feature 功能测试 | performance 性能测试 | config 配置相关 | install 安装部署 | security 安全相关 | interface 接口测试 | unit 单元测试 | other 其他)
stagestring适用阶段(unittest 单元测试阶段 | feature 功能测试阶段 | intergrate 集成测试阶段 | system 系统测试阶段 | smoke 冒烟测试阶段 | bvt 版本验证阶段)
preconditionstring前置条件
priint优先级
stepsarray用例步骤
  ∟  descstring步骤
  ∟  expectstring期望
keywordsstring关键词

请求示例

{
    "title": "case1",
    "pri": 1,
    "steps": [
        {
            "desc": "步骤1",
            "expect": "结果1"
        }
    ],
    "type": "feature"
}

请求响应

名称类型必填描述
idint用例ID
productint所属产品
branchint所属分支
moduleint所属模块
storyint相关需求
storyVersionint需求版本
titlestring需求标题
preconditionstring前置条件
priint优先级
typestring用例类型(feature 功能测试 | performance 性能测试 | config 配置相关 | install 安装部署 | security 安全相关 | interface 接口测试 | unit 单元测试 | other 其他)
stagestring适用阶段(unittest 单元测试阶段 | feature 功能测试阶段 | intergrate 集成测试阶段 | system 系统测试阶段 | smoke 冒烟测试阶段 | bvt 版本验证阶段)
stepsarray用例步骤列表
  ∟  descstring步骤
  ∟  expectstring期望
fromBugint来自于Bug
fromCaseIDint来自于用例
openedBystring创建人
openedDatedatetime创建时间

响应示例

{
    "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": "管理员"
    },
    "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": "步骤1",
            "expect": "结果1"
        }
    ],
    "files": [],
    "currentVersion": 1,
    "caseFails": 0
}