用例

创建用例 分享链接

作者:王怡栋 最后编辑:宋辰轩 于 2024-09-30 15:22:42 浏览量:7358
POST
/products/id/testcases

创建用例

请求URL

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

请求头

名称 类型 必填 描述
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": 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": "步骤1",
            "expect": "结果1"
        }
    ],
    "files": [],
    "currentVersion": 1
}
返回顶部
徐亚京
高级客户经理
17663982076
2679672214
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。 问题反馈反馈点击这里,让我们聆听您的建议与反馈。