Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
泰斯特Test
testcase-automaker
提交
05bcf1e9
T
testcase-automaker
项目概览
泰斯特Test
/
testcase-automaker
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
testcase-automaker
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
05bcf1e9
编写于
10月 13, 2019
作者:
泰斯特Test
提交者:
GitHub
10月 13, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create README_CN.md
上级
7d19d7ba
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
94 addition
and
0 deletion
+94
-0
README_CN.md
README_CN.md
+94
-0
未找到文件。
README_CN.md
0 → 100644
浏览文件 @
05bcf1e9
# testcase-automaker
测试用例制造器,基于 pairwise 以及给定的参数结构自动生成用例参数组合。
## 安装
pip install testcase-automaker
## 最佳实践
from testcase_automaker.interface.http_params_generator import http_params_generator
params_structure = {
'name': {
'type': 'string',
'value': '',
'range': ['张三', '李四'],
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
},
'claimant': {
'type': 'object',
'value': {
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
}
},
'iscompulsory': True
},
'informations': {
'type': 'array',
'value': [{
'claimant': {
'type': 'object',
'value': {
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
},
'phone': {
'type': 'number',
'value': '',
'iscompulsory': True
}
},
'iscompulsory': True
}
},
{
'name': {
'type': 'string',
'value': '',
'iscompulsory': True
}
}
],
'iscompulsory': True
}
}
if __name__ == '__main__':
params_generator = http_params_generator(parameters_structure=params_structure)
params_list = params_generator.generate_params_list()
print(params_generator.generated_params_list)
运行脚本后输出如下:
[{'name': '李四', 'phone': 15746159038, 'claimant': {'name': '华蔹绍', 'phone': 15698064521}, 'informations': [{'claimant': {'name': '齐檠', 'phone': 18912976530}}, {'name': '翟伽硝'}]}, {'name': '张三', 'phone': None, 'claimant': {'name': None, 'phone': None}, 'informations': [{'claimant': {'name': None, 'phone': None}}, {'name': '莫僖烹'}]}, {'name': '李四', 'phone': 18557203961, 'claimant': {'name': None, 'phone': 13736054179}, 'informations': [{'claimant': {'name': None, 'phone': 18810456792}}, {'name': None}]}, {'name': '李四', 'phone': None, 'claimant': {'name': '浦农', 'phone': None}, 'informations': [{'claimant': {'name': '阴桎煅', 'phone': None}}, {'name': None}]}, {'name': '张三', 'phone': None, 'claimant': {'name': None, 'phone': 18238590241}, 'informations': [{'claimant': {'name': '弓肓', 'phone': None}}, {'name': None}]}, {'name': '张三', 'phone': 18265714928, 'claimant': {'name': '昝胀噎', 'phone': None}, 'informations': [{'claimant': {'name': '应兰仓', 'phone': None}}, {'name': None}]}, {'name': '李四', 'phone': None, 'claimant': {'name': '毋羹', 'phone': None}, 'informations': [{'claimant': {'name': None, 'phone': 15701289735}}, {'name': None}]}]
Process finished with exit code 0
输出格式为数组,包含了基于 pairwise 的参数组合
## 联系我
可扫描下方二维码联系我
![
2D-Code
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/微信公众号.jpg
)
## 捐赠
![
2D-Code
](
https://github.com/amazingTest/Taisite-Platform/blob/master/images/wechatDonation.jpg
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录