pytest-api-framework-alpha 0.3.16__tar.gz → 0.3.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/conftest.py +3 -2
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/lark_util.py +4 -3
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/PKG-INFO +1 -1
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/setup.py +1 -1
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/base_class.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/mysql_db.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/redis_db.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exceptions.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exit_code.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/extract.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/global_attribute.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/http_client.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/render_data.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/report.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/script.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/startapp.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/__init__.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/common.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/date_util.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/encrypt.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/log_util.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/mock_util.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/yaml_util.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/validate.py +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/SOURCES.txt +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/dependency_links.txt +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/requires.txt +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/top_level.txt +0 -0
- {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/setup.cfg +0 -0
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/conftest.py
RENAMED
|
@@ -544,10 +544,11 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
|
|
|
544
544
|
skipped=skipped,
|
|
545
545
|
report_url=os.environ.get("ALLURE_REPORT_URL"),
|
|
546
546
|
job_name=os.environ.get("JOB_NAME"),
|
|
547
|
-
env=CONTEXT.get("env")
|
|
547
|
+
env=CONTEXT.get("env"),
|
|
548
|
+
command=CONTEXT.get("command")
|
|
548
549
|
)
|
|
549
550
|
# 发送测试结果统计
|
|
550
|
-
LarkUtil(settings.
|
|
551
|
+
LarkUtil(settings.LARK_CHART_WEBHOOK).send_test_chart(
|
|
551
552
|
total=total,
|
|
552
553
|
passed=passed,
|
|
553
554
|
failed=failed,
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/lark_util.py
RENAMED
|
@@ -66,14 +66,15 @@ class LarkUtil:
|
|
|
66
66
|
data["timestamp"] = timestamp
|
|
67
67
|
return requests.post(self.url, headers=self.headers, data=json.dumps(data))
|
|
68
68
|
|
|
69
|
-
def send_test_report(self, total: int, passed: int, failed: int, skipped: int,
|
|
70
|
-
|
|
69
|
+
def send_test_report(self, total: int, passed: int, failed: int, skipped: int, env: str, job_name: str,
|
|
70
|
+
command: str, report_url: str = None):
|
|
71
71
|
"""自动化测试结果消息(Markdown)"""
|
|
72
72
|
try:
|
|
73
73
|
pass_rate = round(passed / (total - skipped) * 100, 2)
|
|
74
74
|
except ZeroDivisionError:
|
|
75
75
|
pass_rate = 0
|
|
76
76
|
markdown = f"""**执行环境:** {env}
|
|
77
|
+
**执行命令:** {command}
|
|
77
78
|
**执行完成时间:** {datetime.now().strftime("%Y-%m-%d %X")}
|
|
78
79
|
**执行用例总数:** {total}
|
|
79
80
|
**通过用例数:** {passed}
|
|
@@ -86,7 +87,7 @@ class LarkUtil:
|
|
|
86
87
|
title = f"【自动化测试结果】-{job_name} " if job_name else "【自动化测试结果】"
|
|
87
88
|
return self.send_markdown(title, markdown)
|
|
88
89
|
|
|
89
|
-
def send_test_chart(self, total: int, passed: int, failed: int, skipped: int, job_name: str
|
|
90
|
+
def send_test_chart(self, total: int, passed: int, failed: int, skipped: int, job_name: str, env: str):
|
|
90
91
|
|
|
91
92
|
return requests.post(self.url, headers=self.headers,
|
|
92
93
|
json={
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/base_class.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/mysql_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/redis_db.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exceptions.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exit_code.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/extract.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/http_client.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/render_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/startapp.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/__init__.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/common.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/date_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/encrypt.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/log_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/mock_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/yaml_util.py
RENAMED
|
File without changes
|
{pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/validate.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|