Files
InterfaceAutoTest/README.md
CNWei bc55dffe40 feat(): 优化项目
- 更新README
- 修复bug
2025-02-26 17:25:37 +08:00

73 lines
1.1 KiB
Markdown
Raw 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.

# interfaceAutoTest
## 简介
...
## 技术特点
...
## 环境搭建
1安装JAVA
- 配置环境变量
```text
JAVA_HOME
java的安装路径
CLASSPATH
%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
添加Path
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
```
2安装allure
- 配置环境变量
```text
添加Path
allure安装目录\bin
```
## 使用方法
### 1创建测试项目
### 2创建测试文件
- test_开头
- 文件以名字排序,并决定执行顺序
- 文件后缀.yaml
### 3编写用例内容
**必填字段**
| 字段名 | 用途 | 备注 |
|----------|------|------------------|
| title | 用例名称 | |
| request | 请求参数 | |
| extract | 遍历提取 | 保存在extract.yaml中 |
| validate | 接口断言 | 断言定义在CaseInfo中 |
**选填字段**
| 字段名 | 用途 | 备注 |
|-------------|--------|----|
| parametrize | 数据驱动测试 | |
| epic | 项目名称 | |
| feature | 模块名称 | |
| story | 功能名称 | |
**示例**
```yaml
...
```
### 4执行用例