Commit bc07b353 by taoke

复制一个新表

parent 6c394ebb
...@@ -9,23 +9,25 @@ def get_excelData(workBook,sheetName,caseName): ...@@ -9,23 +9,25 @@ def get_excelData(workBook,sheetName,caseName):
workSheet = workBook.sheet_by_name(sheetName) workSheet = workBook.sheet_by_name(sheetName)
list_title = workSheet.row_values(0) list_title = workSheet.row_values(0)
try: try:
num_caseNum = list_title.index('caseNum')
num_function = list_title.index('function')
num_interface = list_title.index('interface')
num_priority = list_title.index('priority')
num_url = list_title.index('url') num_url = list_title.index('url')
num_headers = list_title.index('headers') num_frontInterface = list_title.index('frontInterface')
num_frontCondition = list_title.index('frontCondition')
num_method = list_title.index('method') num_method = list_title.index('method')
num_headers = list_title.index('headers')
num_reqData = list_title.index('reqData') num_reqData = list_title.index('reqData')
num_expectResult = list_title.index('expectResult')
num_expectData = list_title.index('expectData') num_expectData = list_title.index('expectData')
num_testPoint = list_title.index('testPoint') num_testPoint = list_title.index('testPoint')
num_caseNum = list_title.index('caseNum')
num_otherExpectData =list_title.index('otherExpectData') num_otherExpectData =list_title.index('otherExpectData')
num_function =list_title.index('function')
num_interface=list_title.index('interface')
num_priority = list_title.index('priority')
num_yapiAddress = list_title.index('yapiAddress') num_yapiAddress = list_title.index('yapiAddress')
num_creator = list_title.index('creator') num_creator = list_title.index('creator')
num_autoCreator = list_title.index('autoCreator') num_autoCreator = list_title.index('autoCreator')
num_frontInterface = list_title.index('frontInterface')
num_frontCondition = list_title.index('frontCondition')
num_expectResult = list_title.index('expectResult')
lis = [] lis = []
idx = 0 idx = 0
...@@ -82,7 +84,7 @@ def get_excelData(workBook,sheetName,caseName): ...@@ -82,7 +84,7 @@ def get_excelData(workBook,sheetName,caseName):
if __name__ == '__main__': if __name__ == '__main__':
workBook = xlrd.open_workbook('../../test_case_data/bmc/bmc_testcase01_20210513.xlsx') workBook = xlrd.open_workbook('../../test_case_data/bmc/bmc_testcase_20210513.xlsx')
li = get_excelData(workBook,"积分商城","focusSuccessIntegral") li = get_excelData(workBook,"积分商城","focusSuccessIntegral")
print(li) print(li)
......
...@@ -15,7 +15,7 @@ from config import BMCConfig ...@@ -15,7 +15,7 @@ from config import BMCConfig
@allure.epic("账号信息基本功能") @allure.epic("账号信息基本功能")
# @allure.feature("账号信息基本功能") # @allure.feature("账号信息基本功能")
class TestLogin(): class TestLogin():
workBook = xlrd.open_workbook(f'{BMCConfig.root_path}/test_case_data/bmc/bmc_testcase01_20210513.xlsx') workBook = xlrd.open_workbook(f'{BMCConfig.root_path}/test_case_data/bmc/bmc_base_info_2021513.xlsx')
@allure.story("账号信息基本功能") @allure.story("账号信息基本功能")
@allure.severity("") @allure.severity("")
@allure.title("{inData[testPoint]}") @allure.title("{inData[testPoint]}")
......
...@@ -290,5 +290,4 @@ if __name__ == '__main__': ...@@ -290,5 +290,4 @@ if __name__ == '__main__':
if 'json' in one: if 'json' in one:
os.remove(f'../../report/tmp/{one}') os.remove(f'../../report/tmp/{one}')
pytest.main(['test_creditRight.py', '-s', '--alluredir','../../report/tmp']) pytest.main(['test_creditRight.py', '-s', '--alluredir','../../report/tmp'])
# 启动默认浏览器打开报告
os.system('allure serve ../../report/tmp') os.system('allure serve ../../report/tmp')
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