def write_excel(self,xmind_file):
'''生成excel文件函数'''
self.module_file= xlrd.open_workbook("D:\\Users\\"+getpass.getuser()+"\\测试用例集\\模板文件夹\\测试用例模板.xls")
self.new_module_file = copy.copy(self.module_file)
self.sheet_index = self.new_module_file.get_sheet(0)
list = []
self.out = xmind_to_dict(xmind_file) # print(self.out)
self.xls_name=self.out[0]['topic']['title'] #print(self.xls_name)
self.story = self.out[0]['topic']['topics'] #主题层 print(self.story)
self.storynum = len(self.story)
for j in range(0,self.storynum):
self.story_name = self.story[j]['title']
self.test_casedata = self.story[j]['topics'] #用例层# print(self.test_casedata)
self.test_casedatanum = len(self.test_casedata)
for i in range(0,self.test_casedatanum):
|