WebsocketTest 1.0.13__py3-none-any.whl → 1.0.15__py3-none-any.whl

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.
@@ -1,7 +1,7 @@
1
1
  import subprocess
2
2
  import argparse
3
3
  import shutil
4
- import time,platform
4
+ import time
5
5
  import webbrowser
6
6
  from urllib.request import urlopen
7
7
  from urllib.error import URLError
@@ -93,6 +93,19 @@ class TestRunner:
93
93
  logger.error(f"Tests failed with exit code {e.returncode}")
94
94
  except subprocess.TimeoutExpired:
95
95
  logger.error("Test execution timed out after 1 hour")
96
+
97
+ def generate_allure_report(self) -> bool:
98
+ """生成Allure报告"""
99
+ try:
100
+ cmd = [self.allure_manager.allure_path, "generate", self.allure_results, "-o", self.args.report_dir, "--clean"]
101
+ subprocess.run(
102
+ cmd,
103
+ check=True,
104
+ timeout=300
105
+ )
106
+ # logger.info(f"generate_allure_report Executing: {' '.join(cmd)}")
107
+ except subprocess.CalledProcessError as e:
108
+ logger.error(f"Report generation failed: {e}")
96
109
  def _handle_allure_report(self) -> bool:
97
110
  """Handle Allure report serving and browser opening."""
98
111
  if self.allure_manager.is_server_running():
@@ -0,0 +1,43 @@
1
+
2
+ 安徽5.0链路aqua测试:
3
+ ws test --env uat --app 0f0826ab --service aqua --project vwa
4
+ ws test --env live --app 0f0826ab --service aqua --project vwa
5
+ 安徽5.4链路sds_gateway测试:
6
+ ws test --env uat --app 3d7d3ea4 --service gateway_5.4 --project vwa
7
+ ws test --env live --app 3d7d3ea4 --service gateway_5.4 --project vwa
8
+ 安徽5.0链路sds_gateway测试:
9
+ ws test --env uat --app 0f0826ab --service gateway_5.0 --project vwa
10
+ ws test --env live --app 0f0826ab --service gateway_5.0 --project vwa
11
+ 奥迪aqua测试:
12
+ ws test --env uat --app 576d9f07 --service aqua --project aodi
13
+ ws test --env live --app 576d9f07 --service aqua --project aodi
14
+ 上汽5.0链路sds_gateway测试:
15
+ ws test --env uat --app 66ba7ded --service gateway_5.0 --project svw
16
+ ws test --env live --app 66ba7ded --service gateway_5.0 --project svw
17
+
18
+ ws startproject d
19
+ python run_tests.py --env live --app 0f0826ab --service gateway_5.0 --project vwa
20
+ pip install -e .
21
+ ws test --env uat --app 3d7d3ea4 --service gateway_5.4 --project vwa --testcase testcase/test_all.py::TestGateway::test[case_suite0]
22
+
23
+ 关闭allure进程
24
+ netstat -ano | findstr "8883"
25
+ taskkill /PID 25804 /F
26
+
27
+ 卸载
28
+ pip uninstall WebsocketTest
29
+ 安装
30
+ pip install WebsocketTest==1.0.14
31
+ 打包
32
+ python setup.py sdist bdist_wheel
33
+ 上传
34
+ twine upload --repository pypi setup_temp/dist/*
35
+
36
+
37
+ 安装虚拟环境
38
+ python -m venv venv
39
+ 激活venv虚拟环境
40
+ Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
41
+ .\venv\Scripts\Activate.ps1
42
+ 退出venv
43
+ deactivate
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: WebsocketTest
3
- Version: 1.0.13
3
+ Version: 1.0.15
4
4
  Summary: websocket api autotest
5
5
  Requires-Dist: allure_python_commons==2.13.5
6
6
  Requires-Dist: numpy==2.2.4
@@ -2,7 +2,7 @@ WebsocketTest/__init__.py,sha256=u71SAVmbgsyp0K21kilo7pIDgeyxsaHAi93clC0OIPQ,556
2
2
  WebsocketTest/allure_installer.py,sha256=OicATAGPC2EBMCxjoKlgFFJA8lfT-qDjakLWwDA8IAU,6194
3
3
  WebsocketTest/cli.py,sha256=HcnjgRLM404fVszrSRAf7G1y9XLJ_ZetVtRIwavS4xE,987
4
4
  WebsocketTest/conftest.py,sha256=xD7IK7airvGH9cDbES-G9PaKUdPazVuv3utB_UfRV-8,1875
5
- WebsocketTest/run_tests.py,sha256=h9nUW5qi48ZrQC8IasaS8zl3jKis-TrA7ije224VAi0,5697
5
+ WebsocketTest/run_tests.py,sha256=kKdanw4dWdp3IY3Bm0-GVDpMgEu5mBbTQ7hbJ1-gusM,6227
6
6
  WebsocketTest/caseScript/Aqua.py,sha256=dTjVd4FPka5lMUvxa1DsGTJ6gx7NRo5NGNunrue3d0M,7439
7
7
  WebsocketTest/caseScript/Gateway.py,sha256=4_BlJPbn6X_eFHYz2orn3fXPQMPz5jRdUlj6tXkeX2Q,11748
8
8
  WebsocketTest/caseScript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -18,6 +18,7 @@ WebsocketTest/common/utils.py,sha256=DfRwSqbci1w-omUjO4TlkqTqlc-_69Gs9JQtwL3-YSo
18
18
  WebsocketTest/libs/allure-2.30.0.zip,sha256=SEc2gYElQbTQrIcpJ5gLIWptfPW8kPITU8gs4wezZho,26551281
19
19
  WebsocketTest/templates/basic/conftest.py,sha256=y2_2961mhCYSRMp5X9xLq3nOmRzaTSgD3GDdrlTqxn4,1885
20
20
  WebsocketTest/templates/basic/pytest.ini,sha256=An32MB2Yy2L4EVP9WoczW8x0ISAXsgG0tlSLta-cDcs,589
21
+ WebsocketTest/templates/basic/执行命令.txt,sha256=4qGUn4kRIfeS7yy13AWX-0K315vC3gffFXAGtVkoXkE,1574
21
22
  WebsocketTest/templates/basic/config/svw/live.yml,sha256=dqTMDubVYO0lt2kPoHgbZW0ZVMaLO7-OjfBmHedqJuU,31
22
23
  WebsocketTest/templates/basic/config/svw/uat.yml,sha256=DX8Bn_iL5JdFHxHSo1QdRHZLC0C6pId84dit2nutkqM,30
23
24
  WebsocketTest/templates/basic/config/svw/aqua/uat.yml,sha256=Kn5vnsCVWaLuJA2m97EYy3ZN123H66-z2XSxAzgO97Q,358
@@ -82,8 +83,8 @@ WebsocketTest/templates/basic/testcase/__pycache__/test_gateway.cpython-310-pyte
82
83
  WebsocketTest/templates/basic/testcase/__pycache__/test_gateway1.cpython-310-pytest-8.2.2.pyc,sha256=9_jiZtyNwQfXe-Jz1acHxrwz5snYfBngqgTFtIWhRNA,5684
83
84
  WebsocketTest/templates/basic/testcase/__pycache__/test_gatewaybak.cpython-310-pytest-8.2.2.pyc,sha256=L50gNeQvSuFq2e-arnmKqYJR75ZrThiVaiIow5UUTjo,5587
84
85
  WebsocketTest/templates/basic/testcase/__pycache__/test_limin.cpython-310-pytest-8.2.2.pyc,sha256=hx7j0GNxlgTscC36dUBHeo401Mo3bRt1cq6t7e7dDSA,3434
85
- websockettest-1.0.13.dist-info/METADATA,sha256=WfhXvm8aInatCkuFKlY2jVluV9zlHrtv93ukoVVdkFI,334
86
- websockettest-1.0.13.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
87
- websockettest-1.0.13.dist-info/entry_points.txt,sha256=9-0RmZ0nVgfDKaDFyk5xv8arp_us-7w5Negvis1CvYc,46
88
- websockettest-1.0.13.dist-info/top_level.txt,sha256=2iF1gZSbXLjVFOe5ZKQiCLC1FzAwhcQUM88yGi-vrCU,14
89
- websockettest-1.0.13.dist-info/RECORD,,
86
+ websockettest-1.0.15.dist-info/METADATA,sha256=pIda7CRcRDH1fr6AS-74N9PtuH1-p3GlBiUyRpZ1jbA,334
87
+ websockettest-1.0.15.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
88
+ websockettest-1.0.15.dist-info/entry_points.txt,sha256=r5FtB9A16mLy9v8B77rzZOxgn63ao8z4FTyvJ2KS3jo,108
89
+ websockettest-1.0.15.dist-info/top_level.txt,sha256=2iF1gZSbXLjVFOe5ZKQiCLC1FzAwhcQUM88yGi-vrCU,14
90
+ websockettest-1.0.15.dist-info/RECORD,,
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ install-allure = WebsocketTest.allure_installer:ensure_allure
3
+ ws = WebsocketTest.cli:main
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- ws = WebsocketTest.cli:main