1 Star 0 Fork 3

lxtong/TestPlatformByYangLiang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.py 752 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
import pytest
from pytest_jsonreport.plugin import JSONReport
from weCom.send import Robot
if __name__ == '__main__':
plugin = JSONReport()
pytest.main(["-s", "-v", "./testCase/test_api.py", "--alluredir=./testReportData/unit",
"--junit-xml=./testReportData/xml/report.xml"], plugins=[plugin])
summary = plugin.report.get("summary")
passed = summary.get("passed", 0)
failed = summary.get("failed", 0)
skipped = summary.get("skipped", 0)
error = summary.get("error", 0)
total = summary.get("total", 0)
Robot().send_message(total, passed, failed, skipped, error)
# os.system("pytest -s ./testCase/test_api.py --alluredir=./testReportData/unit")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wftong/TestPlatformByYangLiang.git
git@gitee.com:wftong/TestPlatformByYangLiang.git
wftong
TestPlatformByYangLiang
TestPlatformByYangLiang
master

搜索帮助