Commit 0ce2780a by taoke

读取excle文件,添加目录配置

parent a93f0ea3
#coding:utf-8
import os
class BaseConfig():
"""基础配置类"""
......@@ -10,6 +11,7 @@ class BaseConfig():
salt = 'hikcreate_xj' # SSO 登录的东西
secs=0.1 # 测试用例间隔运行时间
test_redis = {"host": "10.197.236.197", "port": 6379, "password": "123456"}
root_path = os.path.abspath(os.path.dirname(__file__)) # 项目根目录
class BMCConfig(BaseConfig):
......
......@@ -9,10 +9,11 @@ from service.login import BMY
from common.tools import request_main
from config import BmyConfig
@allure.epic("营运车企业端")
@allure.feature("登录模块")
class TestLogin():
workBook = xlrd.open_workbook('test_case_data/bmy/bmy_case.xlsx')
workBook = xlrd.open_workbook(f'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx')
@allure.story("登录")
@allure.title("登录认证")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment