WebsocketTest 1.0.2__tar.gz → 1.0.4__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 (34) hide show
  1. websockettest-1.0.4/PKG-INFO +16 -0
  2. websockettest-1.0.4/WebsocketTest/__init__.py +21 -0
  3. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/caseScript/Aqua.py +3 -3
  4. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/caseScript/Gateway.py +3 -3
  5. websockettest-1.0.4/WebsocketTest/cli.py +26 -0
  6. websockettest-1.0.4/WebsocketTest/commands/startproject.py +28 -0
  7. websockettest-1.0.4/WebsocketTest/commands/test.py +19 -0
  8. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/Assertion.py +1 -1
  9. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/WSBaseApi.py +3 -3
  10. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/WebSocketApi.py +1 -1
  11. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/assertUtils.py +1 -1
  12. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/utils.py +1 -1
  13. websockettest-1.0.4/WebsocketTest/conftest.py +63 -0
  14. websockettest-1.0.4/WebsocketTest/run_tests.py +147 -0
  15. websockettest-1.0.4/WebsocketTest.egg-info/PKG-INFO +16 -0
  16. websockettest-1.0.4/WebsocketTest.egg-info/SOURCES.txt +26 -0
  17. websockettest-1.0.4/WebsocketTest.egg-info/entry_points.txt +2 -0
  18. websockettest-1.0.4/WebsocketTest.egg-info/top_level.txt +1 -0
  19. {WebsocketTest-1.0.2 → websockettest-1.0.4}/setup.cfg +3 -0
  20. websockettest-1.0.4/setup.py +43 -0
  21. WebsocketTest-1.0.2/PKG-INFO +0 -7
  22. WebsocketTest-1.0.2/WebsocketTest.egg-info/PKG-INFO +0 -7
  23. WebsocketTest-1.0.2/WebsocketTest.egg-info/SOURCES.txt +0 -21
  24. WebsocketTest-1.0.2/WebsocketTest.egg-info/entry_points.txt +0 -2
  25. WebsocketTest-1.0.2/WebsocketTest.egg-info/top_level.txt +0 -3
  26. WebsocketTest-1.0.2/setup.py +0 -26
  27. WebsocketTest-1.0.2/testcase/test_all.py +0 -10
  28. {WebsocketTest-1.0.2 → websockettest-1.0.4}/README.md +0 -0
  29. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/caseScript/__init__.py +0 -0
  30. {WebsocketTest-1.0.2/common → websockettest-1.0.4/WebsocketTest/commands}/__init__.py +0 -0
  31. {WebsocketTest-1.0.2/testcase → websockettest-1.0.4/WebsocketTest/common}/__init__.py +0 -0
  32. {WebsocketTest-1.0.2 → websockettest-1.0.4/WebsocketTest}/common/logger.py +0 -0
  33. {WebsocketTest-1.0.2 → websockettest-1.0.4}/WebsocketTest.egg-info/dependency_links.txt +0 -0
  34. {WebsocketTest-1.0.2 → websockettest-1.0.4}/WebsocketTest.egg-info/requires.txt +0 -0
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: WebsocketTest
3
+ Version: 1.0.4
4
+ Summary: websocket api autotest
5
+ Author: chencheng
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: allure_python_commons==2.13.5
8
+ Requires-Dist: numpy==2.2.4
9
+ Requires-Dist: pandas==2.2.3
10
+ Requires-Dist: pytest==8.2.2
11
+ Requires-Dist: PyYAML==6.0.2
12
+ Requires-Dist: websockets==12.0
13
+ Dynamic: author
14
+ Dynamic: requires-dist
15
+ Dynamic: requires-python
16
+ Dynamic: summary
@@ -0,0 +1,21 @@
1
+ __version__ = "1.1.0"
2
+ __description__ = "One-stop solution for AUTO testing."
3
+
4
+ # import firstly for monkey patch if needed
5
+ # from pastor.ext.locust import main_locusts
6
+ # from pastor.parser import parse_parameters as Parameters
7
+ # from pastor.runner import Pastor
8
+ # from pastor.testcase import Config, Step, RunRequest, RunTestCase, RunLocation
9
+
10
+ __all__ = [
11
+ "__version__",
12
+ "__description__"
13
+ # ,
14
+ # "Pastor",
15
+ # "Config",
16
+ # "Step",
17
+ # "RunLocation",
18
+ # "RunRequest",
19
+ # "RunTestCase",
20
+ # "Parameters",
21
+ ]
@@ -1,8 +1,8 @@
1
1
 
2
- from common.utils import *
2
+ from WebsocketTest.common.utils import *
3
3
  from urllib.parse import quote_plus
4
- from common import WSBaseApi
5
- from common.WSBaseApi import WSBaseApi
4
+ from WebsocketTest.common import WSBaseApi
5
+ from WebsocketTest.common.WSBaseApi import WSBaseApi
6
6
 
7
7
 
8
8
 
@@ -6,8 +6,8 @@ import hashlib
6
6
  import hmac,time
7
7
  from urllib.parse import urlencode, urlparse
8
8
  import uuid
9
- from common.utils import *
10
- from common.WSBaseApi import WSBaseApi
9
+ from WebsocketTest.common.utils import *
10
+ from WebsocketTest.common.WSBaseApi import WSBaseApi
11
11
  from pathlib import Path
12
12
 
13
13
  class ApiTestRunner(WSBaseApi):
@@ -66,7 +66,7 @@ class ApiTestRunner(WSBaseApi):
66
66
  while True:
67
67
  try:
68
68
  msg = await ws.recv()
69
- # print(msg)
69
+ print(msg)
70
70
  response_data = json.loads(msg)
71
71
  # code 返回码,0表示成功,其它表示异常
72
72
  if response_data["header"]["code"] == 0:
@@ -0,0 +1,26 @@
1
+ import argparse
2
+ from pathlib import Path
3
+ from importlib import import_module
4
+
5
+ def main():
6
+ parser = argparse.ArgumentParser(description="ws CLI")
7
+ subparsers = parser.add_subparsers(dest='command', required=True)
8
+
9
+ # 动态加载子命令
10
+ commands_dir = Path(__file__).parent / "commands"
11
+ for cmd_file in commands_dir.glob("*.py"):
12
+ if cmd_file.stem != "__init__":
13
+ cmd_name = cmd_file.stem
14
+ module = import_module(f"WebsocketTest.commands.{cmd_name}")
15
+ cmd_parser = subparsers.add_parser(cmd_name, help=module.__doc__)
16
+ if hasattr(module, 'configure_parser'):
17
+ module.configure_parser(cmd_parser)
18
+ # 关键:绑定执行函数
19
+ if hasattr(module, 'func'):
20
+ cmd_parser.set_defaults(func=module.func)
21
+ args = parser.parse_args()
22
+ args.func(args) # 调用子命令的执行函数
23
+
24
+
25
+ if __name__ == "__main__":
26
+ main()
@@ -0,0 +1,28 @@
1
+ import shutil
2
+ from pathlib import Path
3
+
4
+
5
+ def configure_parser(parser):
6
+ """配置子命令参数"""
7
+ parser.add_argument("project_name", help="项目名称")
8
+ parser.add_argument("-t", "--template",
9
+ choices=["basic", "advanced"],
10
+ default="basic")
11
+ parser.add_argument("--force", action="store_true",
12
+ help="覆盖已存在目录")
13
+
14
+ def execute(args):
15
+ """执行项目创建"""
16
+ template_dir = Path(__file__).parent.parent / "templates" / args.template
17
+ target_dir = Path.cwd() / args.project_name
18
+
19
+ if target_dir.exists():
20
+ if not args.force:
21
+ raise FileExistsError(f"目录已存在: {target_dir}")
22
+ shutil.rmtree(target_dir)
23
+
24
+ shutil.copytree(template_dir, target_dir)
25
+ print(f"项目创建成功: {target_dir}")
26
+
27
+ # 注册到主CLI
28
+ func = execute
@@ -0,0 +1,19 @@
1
+
2
+ from WebsocketTest.run_tests import TestRunner
3
+
4
+
5
+ def configure_parser(parser):
6
+ """配置子命令参数"""
7
+ parser.add_argument("--env", required=True, help="Test environment")
8
+ parser.add_argument("--app", required=True, help="Application ID")
9
+ parser.add_argument("--service", required=True, help="Service name")
10
+ parser.add_argument("--project", required=True, help="Project name")
11
+ parser.add_argument("--port", type=int, default=8883, help="Allure report port")
12
+ parser.add_argument("--report-dir", default="allure_report", help="Allure report directory")
13
+
14
+ def execute(args):
15
+ """执行test"""
16
+ test_runner = TestRunner(args)
17
+ exit(test_runner.run())
18
+ # 注册到主CLI
19
+ func = execute
@@ -1,6 +1,6 @@
1
1
 
2
2
  from datetime import datetime, timedelta,date
3
- from common.assertUtils import *
3
+ from WebsocketTest.common.assertUtils import *
4
4
  import pytest
5
5
 
6
6
 
@@ -1,10 +1,10 @@
1
1
  import websockets
2
2
  from functools import cached_property
3
3
  import asyncio
4
- from common.utils import *
4
+ from WebsocketTest.common.utils import *
5
5
  import allure
6
6
  from pathlib import Path
7
- from common.Assertion import Assert
7
+ from WebsocketTest.common.Assertion import Assert
8
8
  import pytest
9
9
  import traceback
10
10
  class WSBaseApi:
@@ -39,7 +39,7 @@ class BaseApiTest:
39
39
  def API_TEST_RUNNER_CLASS(self):
40
40
  """动态加载对应的测试运行器类(自动缓存)"""
41
41
  class_prefix = self.__class__.__name__[4:] # TestGateway -> Gateway
42
- module_path = f"caseScript.{class_prefix}"
42
+ module_path = f"WebsocketTest.caseScript.{class_prefix}"
43
43
 
44
44
  try:
45
45
  module = __import__(module_path, fromlist=['ApiTestRunner'])
@@ -1,7 +1,7 @@
1
1
  import _thread as thread
2
2
  import logging
3
3
  import websocket # 使用websocket_client
4
- from common.utils import *
4
+ from WebsocketTest.common.utils import *
5
5
 
6
6
  class WebSocketApi:
7
7
  def __init__(self, url, request):
@@ -1,5 +1,5 @@
1
1
  import re
2
- from common.utils import *
2
+ from WebsocketTest.common.utils import *
3
3
  from typing import Literal
4
4
 
5
5
  def get_value(data, path, decode_funcs=None):
@@ -6,7 +6,7 @@ import string
6
6
  from datetime import datetime
7
7
  import email.utils
8
8
  from functools import wraps
9
- from common.logger import *
9
+ from WebsocketTest.common.logger import *
10
10
  from typing import Optional, Union, Literal
11
11
  import numpy as np
12
12
  def get_rfc1123_time():
@@ -0,0 +1,63 @@
1
+ import pytest
2
+ import yaml
3
+ from pathlib import Path
4
+
5
+ # 设置环境信息的 fixture
6
+ @pytest.fixture(scope="session")
7
+ def setup_env(request):
8
+ # 获取命令行参数
9
+ service = request.config.getoption("service")
10
+ project = request.config.getoption("project")
11
+ env = request.config.getoption("env")
12
+ app_id = request.config.getoption("app")
13
+ # 获取当前工作目录,并解析为绝对路径
14
+ current_working_directory = Path.cwd().resolve()
15
+ config_dir = current_working_directory.joinpath('config', project)
16
+
17
+ # Load base configuration
18
+ with open(config_dir.joinpath(f'{env}.yml')) as base_file:
19
+ config = yaml.safe_load(base_file)
20
+
21
+ # Load environment-specific configuration and merge into the base config
22
+ with open(config_dir.joinpath(service, f'{env}.yml')) as env_file:
23
+ env_config = yaml.safe_load(env_file)
24
+ # 合并配置
25
+ environments = config.get('environments', {})
26
+ environments.update(env_config.get('environments', {}))
27
+ # 添加运行时参数
28
+ environments.update({'appId': app_id,
29
+ 'env_name': env,
30
+ 'service': service,
31
+ 'project': project})
32
+ return environments
33
+
34
+ # 添加命令行选项
35
+ def pytest_addoption(parser):
36
+ parser.addoption(
37
+ "--env",
38
+ action="store",
39
+ default="uat",
40
+ help="Environment to use (default: uat)"
41
+ )
42
+ parser.addoption(
43
+ "--app",
44
+ action="store",
45
+ default="0f0826ab",
46
+ help="App to use (default: 0f0826ab)"
47
+ )
48
+ parser.addoption(
49
+ "--service",
50
+ action="store",
51
+ default="0f0826ab",
52
+ help="Service to use (default: aqua)"
53
+ )
54
+ parser.addoption(
55
+ "--project",
56
+ action="store",
57
+ default="vwa",
58
+ help="Project name is required"
59
+ )
60
+
61
+
62
+
63
+
@@ -0,0 +1,147 @@
1
+ import subprocess
2
+ import argparse
3
+ import shutil
4
+ from WebsocketTest.common.logger import *
5
+ import time
6
+ import webbrowser
7
+ from urllib.request import urlopen
8
+ from urllib.error import URLError
9
+ logger = logging.getLogger('run_tests')
10
+ from pathlib import Path
11
+
12
+ class AllureManager:
13
+ def __init__(self, port: int = 8883):
14
+ self.port = port
15
+ self.allure_path = shutil.which("allure")
16
+ if not self.allure_path:
17
+ raise RuntimeError("Allure command line tool not found in PATH")
18
+
19
+ def is_server_running(self) -> bool:
20
+ """检查Allure服务是否已在运行"""
21
+ try:
22
+ with urlopen(f"http://localhost:{self.port}") as response:
23
+ return response.status == 200
24
+ except URLError:
25
+ return False
26
+
27
+ def start_server(self, report_dir: str) -> bool:
28
+ """启动Allure服务"""
29
+ try:
30
+ cmd = [self.allure_path, "open", report_dir, "-p", str(self.port)]
31
+ logger.info(f"start_server Executing: {' '.join(cmd)}")
32
+ subprocess.Popen(
33
+ cmd,
34
+ stdout=subprocess.DEVNULL,
35
+ stderr=subprocess.DEVNULL,
36
+ start_new_session=True
37
+ )
38
+
39
+ time.sleep(3) # 等待服务启动
40
+ return True
41
+ except Exception as e:
42
+ logger.error(f"Failed to start Allure server: {e}")
43
+ return False
44
+
45
+ def refresh_browser_tab(self) -> bool:
46
+ """尝试刷新已打开的Allure标签页"""
47
+ url = f"http://localhost:{self.port}"
48
+
49
+ # 方法1: 使用JavaScript刷新(需要浏览器支持)
50
+ try:
51
+ webbrowser.open_new_tab("javascript:location.reload(true);")
52
+ return True
53
+ except Exception as e:
54
+ logger.warning(f"JavaScript refresh failed: {e}")
55
+
56
+ # 方法2: 使用webbrowser直接打开(会聚焦到已有标签页)
57
+ try:
58
+ browser = webbrowser.get() # 获取系统默认浏览器控制器
59
+ if hasattr(browser, 'open_new_tab'):
60
+ browser.open_new_tab(url) # 大多数浏览器会聚焦到已有标签页
61
+ return True
62
+ except Exception as e:
63
+ logger.error(f"Browser refresh failed: {e}")
64
+
65
+ return False
66
+
67
+ class TestRunner:
68
+ def __init__(self, args):
69
+ """直接存储args对象"""
70
+ self.args = args
71
+ self.allure_manager = AllureManager(self.args.port)
72
+ self.allure_results = str(Path.cwd().joinpath("allure_results"))
73
+
74
+ def run_pytest_tests(self) -> bool:
75
+ """执行pytest测试"""
76
+ case = self.args.service.split('_')[0]
77
+
78
+ cmd = [
79
+ "pytest", str(Path.cwd().joinpath("testcase","test_all.py")),
80
+ "-m", case,
81
+ "--env", self.args.env,
82
+ "--app", self.args.app,
83
+ "--service", self.args.service,
84
+ "--project", self.args.project,
85
+ "--alluredir", self.allure_results
86
+ ]
87
+ try:
88
+ logger.info(f"run_pytest_tests Executing: {' '.join(cmd)}")
89
+ subprocess.run(cmd, check=True, timeout=3600)
90
+ except subprocess.CalledProcessError as e:
91
+ logger.error(f"Tests failed with exit code {e.returncode}")
92
+ except subprocess.TimeoutExpired:
93
+ logger.error("Test execution timed out after 1 hour")
94
+
95
+ def generate_allure_report(self) -> bool:
96
+ """生成Allure报告"""
97
+ try:
98
+ cmd = [self.allure_manager.allure_path, "generate", self.allure_results, "-o", self.args.report_dir, "--clean"]
99
+ subprocess.run(
100
+ cmd,
101
+ check=True,
102
+ timeout=300
103
+ )
104
+ logger.info(f"generate_allure_report Executing: {' '.join(cmd)}")
105
+ except subprocess.CalledProcessError as e:
106
+ logger.error(f"Report generation failed: {e}")
107
+ def _handle_allure_report(self) -> bool:
108
+ """Handle Allure report serving and browser opening."""
109
+ if self.allure_manager.is_server_running():
110
+ logger.info("Refreshing existing Allure report tab...")
111
+ if not self.allure_manager.refresh_browser_tab():
112
+ logger.info("Opening new report...")
113
+ webbrowser.open(f"http://localhost:{self.args.port}")
114
+ else:
115
+ logger.info("Starting new Allure server...")
116
+ if self.allure_manager.start_server(self.args.report_dir):
117
+ webbrowser.open(f"http://localhost:{self.args.port}")
118
+ def run(self):
119
+ # 1. 运行测试
120
+ self.run_pytest_tests()
121
+
122
+ # 2. 生成报告数据
123
+ self.generate_allure_report()
124
+
125
+ # 3. 启动Allure服务
126
+ self._handle_allure_report()
127
+ logger.info(f"http://localhost:{self.args.port}")
128
+ return 0
129
+
130
+ if __name__ == "__main__":
131
+ try:
132
+ parser = argparse.ArgumentParser(description="Run tests with Allure reporting")
133
+ parser.add_argument("--env", required=True, help="Test environment")
134
+ parser.add_argument("--app", required=True, help="Application ID")
135
+ parser.add_argument("--service", required=True, help="Service name")
136
+ parser.add_argument("--project", required=True, help="Project name")
137
+ parser.add_argument("--port", type=int, default=8883, help="Allure report port")
138
+ parser.add_argument("--report-dir", default="allure_report", help="Allure report directory")
139
+ args = parser.parse_args()
140
+ test_runner = TestRunner(args)
141
+ exit(test_runner.run())
142
+ except KeyboardInterrupt:
143
+ logger.info("Process interrupted by user")
144
+ exit(1)
145
+ except Exception as e:
146
+ logger.error(f"Unexpected error: {e}", exc_info=True)
147
+ exit(1)
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: WebsocketTest
3
+ Version: 1.0.4
4
+ Summary: websocket api autotest
5
+ Author: chencheng
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: allure_python_commons==2.13.5
8
+ Requires-Dist: numpy==2.2.4
9
+ Requires-Dist: pandas==2.2.3
10
+ Requires-Dist: pytest==8.2.2
11
+ Requires-Dist: PyYAML==6.0.2
12
+ Requires-Dist: websockets==12.0
13
+ Dynamic: author
14
+ Dynamic: requires-dist
15
+ Dynamic: requires-python
16
+ Dynamic: summary
@@ -0,0 +1,26 @@
1
+ README.md
2
+ setup.cfg
3
+ setup.py
4
+ WebsocketTest/__init__.py
5
+ WebsocketTest/cli.py
6
+ WebsocketTest/conftest.py
7
+ WebsocketTest/run_tests.py
8
+ WebsocketTest.egg-info/PKG-INFO
9
+ WebsocketTest.egg-info/SOURCES.txt
10
+ WebsocketTest.egg-info/dependency_links.txt
11
+ WebsocketTest.egg-info/entry_points.txt
12
+ WebsocketTest.egg-info/requires.txt
13
+ WebsocketTest.egg-info/top_level.txt
14
+ WebsocketTest/caseScript/Aqua.py
15
+ WebsocketTest/caseScript/Gateway.py
16
+ WebsocketTest/caseScript/__init__.py
17
+ WebsocketTest/commands/__init__.py
18
+ WebsocketTest/commands/startproject.py
19
+ WebsocketTest/commands/test.py
20
+ WebsocketTest/common/Assertion.py
21
+ WebsocketTest/common/WSBaseApi.py
22
+ WebsocketTest/common/WebSocketApi.py
23
+ WebsocketTest/common/__init__.py
24
+ WebsocketTest/common/assertUtils.py
25
+ WebsocketTest/common/logger.py
26
+ WebsocketTest/common/utils.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ws = WebsocketTest.cli:main
@@ -0,0 +1 @@
1
+ WebsocketTest
@@ -1,6 +1,9 @@
1
1
  [metadata]
2
2
  description_file = README.MD
3
3
 
4
+ [build]
5
+ build_base = setup_temp/build
6
+
4
7
  [egg_info]
5
8
  tag_build =
6
9
  tag_date = 0
@@ -0,0 +1,43 @@
1
+ from setuptools import find_packages, setup
2
+ from setuptools.command.sdist import sdist
3
+ from setuptools.command.bdist_wheel import bdist_wheel
4
+
5
+ class CustomSdist(sdist):
6
+ def initialize_options(self):
7
+ super().initialize_options()
8
+ self.dist_dir = "setup_temp/dist" # 自定义sdist路径
9
+
10
+ class CustomBdistWheel(bdist_wheel):
11
+ def initialize_options(self):
12
+ super().initialize_options()
13
+ self.dist_dir = "setup_temp/dist" # 自定义wheel路径
14
+
15
+ setup(
16
+ cmdclass={
17
+ 'sdist': CustomSdist,
18
+ 'bdist_wheel': CustomBdistWheel
19
+ },
20
+ name="WebsocketTest",
21
+ version="1.0.4",
22
+ author='chencheng',
23
+ python_requires=">=3.10",
24
+ packages=find_packages(exclude=["WebsocketTest.allure_report", "WebsocketTest.logs", "WebsocketTest.allure_results", "WebsocketTest.config", "WebsocketTest.data","WebsocketTest.testcase"]),
25
+ description="websocket api autotest",
26
+ install_requires = [
27
+ "allure_python_commons==2.13.5",
28
+ "numpy==2.2.4",
29
+ "pandas==2.2.3",
30
+ "pytest==8.2.2",
31
+ "PyYAML==6.0.2",
32
+ "websockets==12.0"
33
+ ],
34
+ entry_points={
35
+ 'console_scripts': [
36
+ "ws=WebsocketTest.cli:main"
37
+ ]
38
+ }
39
+ )
40
+ import shutil
41
+
42
+ # 清理 .egg-info 文件夹
43
+ shutil.rmtree('WebsocketTest.egg-info', ignore_errors=True)
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: WebsocketTest
3
- Version: 1.0.2
4
- Summary: websocket api autotest
5
- Author: chencheng
6
- Requires-Python: >=3.10
7
- Description-Content-Type: text/markdown
@@ -1,7 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: WebsocketTest
3
- Version: 1.0.2
4
- Summary: websocket api autotest
5
- Author: chencheng
6
- Requires-Python: >=3.10
7
- Description-Content-Type: text/markdown
@@ -1,21 +0,0 @@
1
- README.md
2
- setup.cfg
3
- setup.py
4
- WebsocketTest.egg-info/PKG-INFO
5
- WebsocketTest.egg-info/SOURCES.txt
6
- WebsocketTest.egg-info/dependency_links.txt
7
- WebsocketTest.egg-info/entry_points.txt
8
- WebsocketTest.egg-info/requires.txt
9
- WebsocketTest.egg-info/top_level.txt
10
- caseScript/Aqua.py
11
- caseScript/Gateway.py
12
- caseScript/__init__.py
13
- common/Assertion.py
14
- common/WSBaseApi.py
15
- common/WebSocketApi.py
16
- common/__init__.py
17
- common/assertUtils.py
18
- common/logger.py
19
- common/utils.py
20
- testcase/__init__.py
21
- testcase/test_all.py
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- wsrun = WebsocketTest.cli:main_run_alias
@@ -1,3 +0,0 @@
1
- caseScript
2
- common
3
- testcase
@@ -1,26 +0,0 @@
1
- from setuptools import find_packages, setup
2
-
3
-
4
- setup(
5
- name="WebsocketTest",
6
- version="1.0.2",
7
- author='chencheng',
8
- python_requires=">=3.10",
9
- packages=find_packages(exclude=["allure_report", "logs", "allure_results", "config", "data"]),
10
- description="websocket api autotest",
11
- # long_description=open('README.md','r',encoding='utf-8').read(),
12
- long_description_content_type='text/markdown',
13
- install_requires = [
14
- "allure_python_commons==2.13.5",
15
- "numpy==2.2.4",
16
- "pandas==2.2.3",
17
- "pytest==8.2.2",
18
- "PyYAML==6.0.2",
19
- "websockets==12.0"
20
- ],
21
- entry_points={
22
- 'console_scripts': [
23
- 'wsrun=WebsocketTest.cli:main_run_alias'
24
- ]
25
- }
26
- )
@@ -1,10 +0,0 @@
1
- # 具体测试类实现
2
- from common.WSBaseApi import BaseApiTest
3
- import pytest
4
-
5
- @pytest.mark.gateway
6
- class TestGateway(BaseApiTest):pass
7
-
8
-
9
- @pytest.mark.aqua
10
- class TestAqua(BaseApiTest):pass
File without changes