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.
Files changed (32) hide show
  1. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/PKG-INFO +1 -1
  2. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/conftest.py +3 -2
  3. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/lark_util.py +4 -3
  4. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/PKG-INFO +1 -1
  5. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/setup.py +1 -1
  6. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/__init__.py +0 -0
  7. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/base_class.py +0 -0
  8. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/__init__.py +0 -0
  9. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/mysql_db.py +0 -0
  10. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/db/redis_db.py +0 -0
  11. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exceptions.py +0 -0
  12. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/exit_code.py +0 -0
  13. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/extract.py +0 -0
  14. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/global_attribute.py +0 -0
  15. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/http_client.py +0 -0
  16. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/render_data.py +0 -0
  17. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/report.py +0 -0
  18. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/script.py +0 -0
  19. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/startapp.py +0 -0
  20. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/__init__.py +0 -0
  21. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/common.py +0 -0
  22. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/date_util.py +0 -0
  23. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/encrypt.py +0 -0
  24. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/log_util.py +0 -0
  25. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/mock_util.py +0 -0
  26. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/utils/yaml_util.py +0 -0
  27. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/framework/validate.py +0 -0
  28. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/SOURCES.txt +0 -0
  29. {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
  30. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/pytest_api_framework_alpha.egg-info/requires.txt +0 -0
  31. {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
  32. {pytest_api_framework_alpha-0.3.16 → pytest_api_framework_alpha-0.3.18}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-api-framework-alpha
3
- Version: 0.3.16
3
+ Version: 0.3.18
4
4
  Author: alpha
5
5
  Author-email:
6
6
  Requires-Python: >=3.6
@@ -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.LARK_CHART_WEBHOOKS.get(CONTEXT.get("env"))).send_test_chart(
551
+ LarkUtil(settings.LARK_CHART_WEBHOOK).send_test_chart(
551
552
  total=total,
552
553
  passed=passed,
553
554
  failed=failed,
@@ -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, report_url: str = None,
70
- job_name: str = None, env=None):
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 = None, env=None):
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={
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-api-framework-alpha
3
- Version: 0.3.16
3
+ Version: 0.3.18
4
4
  Author: alpha
5
5
  Author-email:
6
6
  Requires-Python: >=3.6
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="pytest-api-framework-alpha", # 包名(必须唯一)
5
- version="0.3.16",
5
+ version="0.3.18",
6
6
  packages=find_packages(),
7
7
  author="alpha",
8
8
  author_email="",