- 最新动态
- 功能总览
- 产品介绍
- 快速入门
-
用户指南
- 测试计划服务(CodeArts TestPlan)使用流程
- 开通CodeArts TestPlan服务
- 访问CodeArts TestPlan服务首页
- 配置CodeArts TestPlan测试计划
- 配置CodeArts TestPlan测试版本
-
配置CodeArts TestPlan测试用例
- CodeArts TestPlan生成测试用例方式介绍
- 通过思维导图创建测试用例
- 创建手工测试用例
-
创建接口自动化测试用例
- CodeArts TestPlan接口自动化用例使用流程
- 创建CodeArts TestPlan接口自动化测试用例模板
- 使用自定义URL请求添加CodeArts TestPlan接口脚本
- 使用Postman快速添加CodeArts TestPlan接口脚本
- 使用cURL快速添加CodeArts TestPlan接口脚本
- 使用关键字库快速添加CodeArts TestPlan接口脚本
- 添加CodeArts TestPlan接口脚本的逻辑控制步骤
- 设置CodeArts TestPlan接口脚本的测试用例参数
- 设置CodeArts TestPlan接口脚本的环境参数
- 导入CodeArts TestPlan接口自动化用例测试数据集
-
接口自动化用例内置函数说明
- 在CodeArts TestPlan中调用二元加法运算函数
- 在CodeArts TestPlan中调用二元减法运算函数
- 在CodeArts TestPlan中调用二元乘法运算函数
- 在CodeArts TestPlan中调用二元除法运算函数
- 在CodeArts TestPlan中调用获取当前时间戳函数
- 在CodeArts TestPlan中调用获取指定时间戳函数
- 在CodeArts TestPlan中调用日期转时间戳函数
- 在CodeArts TestPlan中调用时间戳转日期函数
- 在CodeArts TestPlan中调用时间戳加减运算函数
- 在CodeArts TestPlan中调用生成Base64编码函数
- 在CodeArts TestPlan中调用生成SHA512编码函数
- 在CodeArts TestPlan中调用生成SHA256编码函数
- 在CodeArts TestPlan中调用生成MD5哈希值函数
- 在CodeArts TestPlan中调用生成指定范围随机数函数
- 在CodeArts TestPlan中调用生成指定长度随机字符串函数
- 在CodeArts TestPlan中调用指定范围随机生成小数函数
- 在CodeArts TestPlan中调用生成UUID函数
- 在CodeArts TestPlan中调用倒序索引提取数组函数
- 在CodeArts TestPlan中调用倒序索引提取数组元素的值函数
- 在CodeArts TestPlan中调用大写转小写函数
- 在CodeArts TestPlan中调用小写转大写函数
- 在CodeArts TestPlan中调用字符串拼接函数
- 在CodeArts TestPlan中调用字符串切割函数
- 在CodeArts TestPlan中调用获取字符串长度函数
-
接口自动化用例系统关键字说明
- 系统关键字概述与一览表
- 在CodeArts TestPlan接口脚本中调用GetIAMToken关键字
- 在CodeArts TestPlan接口脚本中调用MySQLQuery关键字
- 在CodeArts TestPlan接口脚本中调用MySQLUpdate关键字
- 在CodeArts TestPlan接口脚本中调用MySQLInsert关键字
- 在CodeArts TestPlan接口脚本中调用MySQLDelete关键字
- 在CodeArts TestPlan接口脚本中调用OpenGaussQuery关键字
- 在CodeArts TestPlan接口脚本中调用OpenGaussUpdate关键字
- 在CodeArts TestPlan接口脚本中调用OpenGaussInsert关键字
- 在CodeArts TestPlan接口脚本中调用OpenGaussDelete关键字
- 在CodeArts TestPlan接口脚本中调用PostgreSQLQuery关键字
- 在CodeArts TestPlan接口脚本中调用PostgreSQLUpdate关键字
- 在CodeArts TestPlan接口脚本中调用PostgreSQLInsert关键字
- 在CodeArts TestPlan接口脚本中调用PostgreSQLDelete关键字
- 在CodeArts TestPlan接口脚本中调用MongoDBQuery关键字
- 在CodeArts TestPlan接口脚本中调用MongoDBInsert关键字
- 在CodeArts TestPlan接口脚本中调用MongoDBUpdate关键字
- 在CodeArts TestPlan接口脚本中调用MongoDBDelete关键字
- 在CodeArts TestPlan接口脚本中调用RedisGet关键字
- 在CodeArts TestPlan接口脚本中调用RedisSet关键字
- 在CodeArts TestPlan接口脚本中调用OBSWrite关键字
- 在CodeArts TestPlan接口脚本中调用OBSDelete关键字
- 在CodeArts TestPlan接口脚本中调用OBSQuery关键字
- 在CodeArts TestPlan接口脚本中调用KafkaProducer关键字
- 在CodeArts TestPlan接口脚本中调用KafkaConsumer关键字
- 在CodeArts TestPlan接口脚本中调用TCP关键字
- 在CodeArts TestPlan接口脚本中调用UDP关键字
- 在CodeArts TestPlan接口脚本中调用WSConnect关键字
- 在CodeArts TestPlan接口脚本中调用WSRequest关键字
- 在CodeArts TestPlan接口脚本中调用WSWriteOnly关键字
- 在CodeArts TestPlan接口脚本中调用WSReadOnly关键字
- 在CodeArts TestPlan接口脚本中调用WSDisConnect关键字
- 在CodeArts TestPlan接口脚本中调用DubboClient关键字
- 执行CodeArts TestPlan测试用例
- 管理CodeArts TestPlan测试用例
- 创建与执行CodeArts TestPlan测试套件
- 查看与评估CodeArts TestPlan测试质量
- 配置CodeArts TestPlan全局配置项
- API参考
- 最佳实践
- 常见问题
- 视频帮助
- 通用参考
链接复制成功!
通过导入仓库中的文件生成接口测试套
功能介绍
通过导入仓库中的文件生成接口测试套
URI
POST /v1/projects/{project_id}/repository/testsuites
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
testsuite_name |
是 |
String |
参数解释 要生成的测试套名称 约束限制 不涉及 取值范围 只能由英文字符组成,且长度为[3-128]个字符 默认取值 不涉及 |
repository_id |
是 |
String |
参数解释 仓库id 约束限制 不涉及 取值范围 只能由英文字符组成,且长度为32个字符 默认取值 不涉及 |
repository_branch |
是 |
String |
参数解释 仓库分支 约束限制 不涉及 取值范围 只能由英文字符组成,且长度为[3-100]个字符 默认取值 不涉及 |
file_path |
是 |
String |
参数解释 仓库中yaml或json文件的相对路径,仅支持swagger 2.0版本的yaml和json文件 约束限制 不涉及 取值范围 只能由英文字符组成,且长度为[6-128]个字符 默认取值 不涉及 |
响应参数
状态码: 201
参数 |
参数类型 |
描述 |
---|---|---|
testsuite_id |
String |
生成的测试套的id |
testcase_ids |
Array of strings |
生成的测试用例uri列表 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
接口调用失败错误码 |
error_detail |
Array of CommonResponseDetail objects |
接口调用失败的详情信息,非参数校验失败没有该结构 |
error_msg |
String |
接口调用失败错误信息 |
参数 |
参数类型 |
描述 |
---|---|---|
step_name |
String |
记录错误步骤名称 |
testcase_name |
String |
用例名称 |
fail_content |
String |
记录实际错误内容值 |
fail_keys |
String |
记录包含错误的关键字 |
fail_source |
String |
记录错误部位header name等 |
fail_type |
String |
记录错误类型 |
stage |
String |
记录包含错误阶段 |
状态码: 401
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
接口调用失败错误码 |
error_msg |
String |
接口调用失败错误信息 |
状态码: 403
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
接口调用失败错误码 |
error_msg |
String |
接口调用失败错误信息 |
状态码: 404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
接口调用失败错误码 |
error_msg |
String |
接口调用失败错误信息 |
状态码: 500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
接口调用失败错误码 |
error_msg |
String |
接口调用失败错误信息 |
请求示例
{ "testsuite_name" : "jalor_test_suite", "repository_id" : "aa03aeee96fa48f0acc223f0ab503a1f", "repository_branch" : "master", "file_path" : "apitest.yaml" }
响应示例
状态码: 201
Created
{ "testsuite_id" : "", "testsuite_ids" : [ "" ] }
状态码
状态码 |
描述 |
---|---|
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
错误码
请参见错误码。