# vonechaintest **Repository Path**: zhangjg_git/vonechaintest ## Basic Information - **Project Name**: vonechaintest - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-07-19 - **Last Updated**: 2024-11-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 配置说明 #### 克隆项目到本地 #### webapi 配置修改 - api链接 - https://www.showdoc.com.cn/1281579904344232/6958588210329184 - 进入目录 vappstest\exchange\webapi - 修改当前目录下的 conftest.py 文件, 找到 setup_request 方法,修改如下信息 ```python @pytest.fixture(scope="session") def setup_request(app_config): env_tag, config = app_config username, password = '', '' # 在下面配置用户的个人信息 if env_tag == 'test': # 测试环境 username = 'test072101' # 修改成当前账户的用户密码 password = 'aa111111' if env_tag == 'uat': # uat环境 username = '' password = '' headers = BusinessApi.LoginApi(config['host'], username, password).gen_data_headers() return config['host'], headers ``` - 测试文件入口 - vappstest\exchange\webapi\tests #### openapi 配置修改 - api链接 - https://www.showdoc.com.cn/1281579904344232/7093121014870130 - 进入目录 vappstest\exchange\openapi - 修改当前目录下的 conftest.py 文件, 找到 openapi_config方法,修改如下信息 ```python @pytest.fixture(scope="session", autouse=True) def openapi_config(app_config): """ 加载 openapi config :param app_config: :return: """ env_tag, config = app_config if not isinstance(config, dict): raise exp.EnvConfigError(f'{config} format error!!!') if 'host' not in config.keys(): raise exp.KeyNotFound(f'key: host not found!!!\nconfig:{config}') api_config = dict() # 在下面配置用户的OPENAPI信息 if env_tag == 'test': # test072101 api_config = { "user_id": "", # 修改成测试环境的用户ID "passphrase": "", # openpai 的密码 "api_key": "", # openpai 的key "secret_key": "", # openpai 的秘钥 } if env_tag == 'uat': api_config = { "user_id": "", "passphrase": "", "api_key": "", "secret_key": "", } return config['host'], api_config ``` - 测试文件入口 - vappstest\exchange\openapi\tests