Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
autointerface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
autointerface
Commits
e3706aa2
Commit
e3706aa2
authored
May 25, 2020
by
桂秋月
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.quantgroup.cn:QA/autointerface
parents
d2a7ab9f
254838c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
README.md
README.md
+54
-0
No files found.
README.md
0 → 100644
View file @
e3706aa2
### 要求
*
python3.7(python3.8中的datetime和3.7不同,还有一些其他模块的实现)
*
pycharm
### 下载程序
```
--
git clone git@git.quantgroup.cn:QA/autointerface.git
unzip BeautifulReport.zip
```
### 安装模块
```
pipenv install 或
pip install XXX ##Pipfile
```
### 名词解释
*
测试用例(单接口):对应禅道上的数字编号
*
测试场景名:为测试场景进行命令,可任意
*
测试场景(多接口):按照数字编号进行一定顺序的组合
*
全局变量:和postman的全局变量一致
*
rule规则:针对测试用例而言,主要用于单接口循环,构建请求参数
*
setup:前置条件,主要用于请求接口前的处理工作,eg:清理redis缓存
*
断言:针对测试用例而言,判断该测试用例是否执行成功
### 使用教程
```
** 新增项目接口(禅道不存在该项目)**
1、禅道上新增模块(禅道访问链接:http://chandao.liangkebang.com/zentao/testcase-browse-5-0-bymodule-0-id_desc-0-100.html)
2、确定该项目对应的yapi地址,通过yapi编写用例
3、用例完成后,通过autoInterface/blueprints/tools/zentaopms_cases.py将禅道上的项目下载到本地目录
4、查看配置,根据用例中的type,查看autoInterface/blueprints/settings.py是否存在,如果不存在,添加即可
5、增加场景:autoInterface/blueprints/KeyData,在testsuit下增加测试场景,其格式:[{'XXX':[编号1,编号2,编号3.。。。]}],key值对应testcase文件夹下的目录名
6、增加配置:autoInterface/blueprints/cases_mapping.py,按已有例子增加
** 执行场景**
1、确定执行环境,修改autoInterface/blueprints/KeyData,在baseinfo下更改environment;确定autoInterface/blueprints/settings.py是否存在该环境,如不存在,增加即可
2、cd autoInterface/blueprints/exec-temp.py,在main下,修改name值即可执行 #该name值对应autoInterface/blueprints/cases_mapping.py下的project_mapping的key值
3、执行完场景后,可在statis/report/XXX下查看生成的测试报告
```
### 思路
主要模块:requests,unittest。通过处理每个测试用例的字段获取http请求的url,header,body|param,断言等
### 备注
可查看当前目录下的HELPME,查看文件树及每个py文件的主要作用
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment