Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api_test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
api_test
Commits
6f97fdb2
Commit
6f97fdb2
authored
Nov 11, 2024
by
李江源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改命令中的'-'的中英文
parent
e10677b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
README.md
+6
-7
No files found.
README.md
View file @
6f97fdb2
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
### 生成pytest测试报告
### 生成pytest测试报告
```
```
pytest
‐vv test_case ‐‐html=./report/html/pytest/test_1/test_report_1.html ‐‐self‐contained‐html ‐‐reruns 5 ‐‐reruns‐
delay 0.1
pytest
-vv test_case --html=./report/html/pytest/test_1/test_report_1.html --self-contained-html --reruns 5 --reruns-
delay 0.1
```
```
### allure生成测试报告
### allure生成测试报告
...
@@ -11,7 +11,7 @@ pytest ‐vv test_case ‐‐html=./report/html/pytest/test_1/test_report_1.html
...
@@ -11,7 +11,7 @@ pytest ‐vv test_case ‐‐html=./report/html/pytest/test_1/test_report_1.html
1.
使用pytest执行用例,生成执行结果的json文件
1.
使用pytest执行用例,生成执行结果的json文件
```
```
pytest 用例模块/用例包
‐‐alluredir=存放json文件的目录 ‐‐clean‐
alluredir
pytest 用例模块/用例包
--alluredir=存放json文件的目录 --clean-
alluredir
```
```
2. 根据第一步测试结果的json文件生成报告。
2. 根据第一步测试结果的json文件生成报告。
...
@@ -19,15 +19,14 @@ pytest ‐vv test_case ‐‐html=./report/html/pytest/test_1/test_report_1.html
...
@@ -19,15 +19,14 @@ pytest ‐vv test_case ‐‐html=./report/html/pytest/test_1/test_report_1.html
```
```
i: 本地生成测试报告服务
i: 本地生成测试报告服务
allure serve 第一步存放测试结果json文件的目录
allure serve 第一步存放测试结果json文件的目录
ii: 生成静态
的
报告
ii: 生成静态报告
allure generate 第一步存放测试结果json文件的目录
‐
o 静态报告存放的目录
allure generate 第一步存放测试结果json文件的目录
-
o 静态报告存放的目录
```
```
#### 例子
#### 例子
```
```
1、pytest test_case ‐‐alluredir=./report/test_json/allure_1 ‐‐clean‐alluredir
1、pytest testcase --alluredir=./report/test_json/allure_1 --clean-alluredir
2(1)、allure serve ./report/test_json/allure_1
2(1)、allure serve ./report/test_json/allure_1 -o ./report/html/allure/allure_1
2(2)、allure generate ./report/test_json/allure_1 -o ./report/html/allure/allure_1
```
```
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