data_factory/README.md

53 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 测试相关项目
### 模块组成
![模块设计](./resources/images/数据拉取框架设计.png "模块设计")
### 数据生成流程
![数据生成流程](./resources/images/数据生成流程图.png "数据生成流程")
### 环境安装
> py3.10以上
```
pip install -r requirements.txt
```
### 目录结构
- config
配置相关
- execute
执行入口文件存放
- resources
其他资源存放
- service
用例相关方法封装
- test_case
测试用例,用于存放测试用例
- test_data
测试数据,用于存放测试数据
- channel_data 已生成的测试数据
- data_demo 渠道模版
- field_config 渠道字段配置
- field_rules 字段校验规则封装
- field_sqls 字段获取规则封装
- sql_config 查询sql配置
- utils
基础方法封装
### 数据生成流程
1. 获取主数据
2. 拼接主数据,临时储存用于数据拼接和校验等 - holo
3. 获取dataDemo中的excel模版
4. 建立字段方法对应关系,字段生成规则
字段 - 方法名称使用枚举做对应关系
5. 根据主数据,拼接主数据部分,根据字段规则,调用生成其余字段数据
6. 生成数据数量作为参数传输
7. 返回生成的数据写入excel