summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorzhangchengwei <[email protected]>2023-11-09 12:27:30 +0800
committerzhangchengwei <[email protected]>2023-11-09 12:27:30 +0800
commitb2328cd1e0daba6ab064b6b0dc37efc7464e5194 (patch)
treeeb1cbb423873f0f077873f86e0f7f59e2807dbbb /main.py
parent080d68e6498c74d022fb8b2ea35ba30f4b4c6e23 (diff)
更改目录
Diffstat (limited to 'main.py')
-rw-r--r--main.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 00000000..3e60636c
--- /dev/null
+++ b/main.py
@@ -0,0 +1,29 @@
+import pytest
+
+
+
+
+
+
+if __name__ == '__main__':
+ pytest.main(["-s", "-v", "cases/"])
+
+ """
+ # 在测试文件的当前路径执行如下命令执行测试用例:
+ --max
+ pytest -cache-clear -sv ./cases/ 直接执行pytest测试命令
+ pytest –cache-clear -v pytest_json.py --alluredir ./results/reports
+ --check-max-tb 9000 #最大校验
+ --reruns=1 #失败重运行次数
+ pytest -cache-clear -sv ./cases/ui --check-max-tb 9000 --alluredir ./results/reports
+ pytest -cache-clear -sv ./cases/ui --check-max-tb 9000 --reruns=1 --alluredir ./results/reports
+ allure serve ./results/reports
+ # 执行如下命令生成测试报告(自动打开浏览器):
+ allure serve allure
+
+
+ 使用allure插件生成的在线报告。
+ 1.执行的命令: pytest -cache-clear -sv ./cases --check-max-tb 9000 --alluredir ./results/reports
+ 2.跑完后,生成报告的命令: allure serve ./results/reports
+
+ """ \ No newline at end of file