测试计划 CodeArts TestPlan
测试计划 CodeArts TestPlan
- 最新动态
- 功能总览
- 产品介绍
- 快速入门
-
用户指南
- 测试计划服务(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参考
- 最佳实践
- 常见问题
- 视频帮助
- 通用参考
文档首页/
测试计划 CodeArts TestPlan/
用户指南/
配置CodeArts TestPlan测试用例/
创建接口自动化测试用例/
接口自动化用例系统关键字说明/
在CodeArts TestPlan接口脚本中调用GetIAMToken关键字
链接复制成功!
在CodeArts TestPlan接口脚本中调用GetIAMToken关键字
概述
该系统关键字可以用于通过用户名/密码的方式进行认证来获取IAM用户Token。Token是系统颁发给IAM用户的访问令牌,承载用户的身份、权限等信息。调用IAM以及其他云服务的接口时,可以使用该系统关键字获取的IAM用户Token。
参数详解
参数 |
是否必选 |
参数类型 |
默认值 |
描述 |
---|---|---|---|---|
IAM Token URL |
是 |
String |
https://iam.myhuaweicloud.com/v3/auth/tokens |
IAM的Endpoint(终端节点)。 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。 |
Domain Name |
是 |
String |
<空> |
IAM用户所属账号名称/租户名。 当使用华为账号登录时,租户(账号)名称与用户名相同。关于如何获取账号名称请参见:获取账号。 |
User Name |
是 |
String |
<空> |
IAM用户名。关于如何获取用户名称请参见:获取IAM用户名。 |
Password |
是 |
String |
<空> |
IAM用户登录密码(登录密码属于个人敏感信息,须在环境参数中定义为敏感参数)。 |
Region ID |
否 |
String |
<空> |
区域ID(如:cn-north-1),关于如何获取区域ID请参见:获取区域ID。 |
默认检查点
名称 |
预期值 |
---|---|
结果 |
成功 |
默认响应提取
名称 |
提取变量 |
含义 |
---|---|---|
IAM_TOKEN |
X-Subject-Token |
用户TOKEN字符 |
响应
- 状态:成功
参数
参数类型
描述
Body
IAM接口返回体
IAM接口返回体
- 响应示例
{ "token": { "catalog": [], "expires_at": "2020-01-04T09:05:22.701000Z", "issued_at": "2020-01-03T09:05:22.701000Z", "methods": [ "password" ], "project": { "domain": { "id": "d78cbac186b744899480f25bd022f...", "name": "IAMDomain" }, "id": "aa2d97d7e62c4b7da3ffdfc11551f...", "name": "cn-north-1" }, "roles": [ { "id": "0", "name": "te_admin" }, { "id": "0", "name": "op_gated_OBS_file_protocol" }, { "id": "0", "name": "op_gated_Video_Campus" } ], "user": { "domain": { "id": "d78cbac186b744899480f25bd022f...", "name": "IAMDomain" }, "id": "7116d09f88fa41908676fdd4b039e...", "name": "IAMUser", "password_expires_at": "" } }, "X-Subject-Token": "MIIatAYJKoZIhvcNAQcCoIIapTCCGqECAQExDTALB..." }
示例
- 获取IAM用户TOKEN
Password字段属于敏感参数,需要在变量里面配置且设置为敏感参数,在下拉框中选用。
- 在接口中引用TOKEN
IAM_TOKEN为保留的默认响应提取,可以直接在请求里面引用。
父主题: 接口自动化用例系统关键字说明