代码拉取完成,页面将自动刷新
同步操作将从 jshsiung/xmind2testcase_import2zentao 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
import json
import xmind
import logging
from xmind2testcase.zentao import xmind_to_zentao_csv_file
from xmind2testcase.testlink import xmind_to_testlink_xml_file
from xmind2testcase.utils import xmind_testcase_to_json_file
from xmind2testcase.utils import xmind_testsuite_to_json_file
from xmind2testcase.utils import get_xmind_testcase_list
from xmind2testcase.utils import get_xmind_testsuite_list
logging.basicConfig(level=logging.INFO)
def main():
xmind_file = 'docs/xmind_testcase_template_v1.1.xmind'
print('Start to convert XMind file: %s' % xmind_file)
"""
# 1、testcases import file
# (1) zentao
zentao_csv_file = xmind_to_zentao_csv_file(xmind_file)
print('Convert XMind file to zentao csv file successfully: %s' % zentao_csv_file)
# (2) testlink
testlink_xml_file = xmind_to_testlink_xml_file(xmind_file)
print('Convert XMind file to testlink xml file successfully: %s' % testlink_xml_file)
# 2、 testcases json file
# (1) testsuite
testsuite_json_file = xmind_testsuite_to_json_file(xmind_file)
print('Convert XMind file to testsuite json file successfully: %s' % testsuite_json_file)
# (2) testcase
"""
testcase_json_file = xmind_testcase_to_json_file(xmind_file)
print('Convert XMind file to testcase json file successfully: %s' % testcase_json_file)
"""
# 3、test dict/json data
# (1) testsuite
testsuites = get_xmind_testsuite_list(xmind_file)
print('Convert XMind to testsuits dict data:\n%s' %
json.dumps(testsuites, indent=2, separators=(',', ': '), ensure_ascii=False))
# (2) testcase
testcases = get_xmind_testcase_list(xmind_file)
print('Convert Xmind to testcases dict data:\n%s' %
json.dumps(testcases, indent=4, separators=(',', ': '), ensure_ascii=False))
# (3) xmind file
workbook = xmind.load(xmind_file)
print('Convert XMind to Json data:\n%s' %
json.dumps(workbook.getData(), indent=2, separators=(',', ': '), ensure_ascii=False))
print('Finished conversion, Congratulations!')
"""
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。