用例

修改用例

作者:王怡栋最后编辑:宋辰轩 于 2024-09-30 15:27:31 浏览量:14760 分享链接/book/api/728.html
PUT
/testcases/id

修改用例

请求URL

https://xxx.com/api.php/v1/testcases/id

请求头

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

请求体

名称 类型 必填 描述
branch int 否 所属分支
module int 否 所属模块
story int 否 所属需求
title string 否 用例标题
type string 否 用例类型(feature 功能测试 | performance 性能测试 | config 配置相关 | install 安装部署 | security 安全相关 | interface 接口测试 | unit 单元测试 | other 其他)
stage string 否 适用阶段(unittest 单元测试阶段 | feature 功能测试阶段 | intergrate 集成测试阶段 | system 系统测试阶段 | smoke 冒烟测试阶段 | bvt 版本验证阶段)
precondition string 否 前置条件
pri int 否 优先级
steps array 否 用例步骤
  ∟  desc string 否 步骤
  ∟  expect string 否 期望
keywords string 否 关键词

请求示例

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

请求响应

名称 类型 必填 描述
id int 是 用例ID
product int 是 所属产品
branch int 是 所属分支
module int 是 所属模块
story int 是 相关需求
storyVersion int 是 需求版本
title string 是 需求标题
precondition string 是 前置条件
pri int 是 优先级
type string 是 用例类型(feature 功能测试 | performance 性能测试 | config 配置相关 | install 安装部署 | security 安全相关 | interface 接口测试 | unit 单元测试 | other 其他)
stage string 是 适用阶段(unittest 单元测试阶段 | feature 功能测试阶段 | intergrate 集成测试阶段 | system 系统测试阶段 | smoke 冒烟测试阶段 | bvt 版本验证阶段)
steps array 是 用例步骤列表
  ∟  desc string 是 步骤
  ∟  expect string 是 期望
fromBug int 否 来自于Bug
fromCaseID int 否 来自于用例
openedBy string 是 创建人
openedDate datetime 是 创建时间

响应示例

{
    "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
}
返回顶部
客服头像
金娟
高级客户经理
客服微信
18562856230
1826606239
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。问题反馈反馈点击这里,让我们聆听您的建议与反馈。
gtm跟踪器
gtag
UET