Closed tester1234562020 closed 5 years ago
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))
包含中文,输出时加上ensure_ascii即可
{ "name": "\u7528\u529b1 \u5b50\u4e3b\u9898 1 \u5b50\u4e3b\u9898 1", "version": 1, "summary": "\u7528\u529b1 \u5b50\u4e3b\u9898 1 \u5b50\u4e3b\u9898 1", "preconditions": "\u65e0", "execution_type": 1, "importance": 2, "estimated_exec_duration": 3, "status": 7, "result": 0, "steps": [], "product": "\u4e2d\u5fc3\u4e3b\u9898", "suite": "\u5206\u652f\u4e3b\u9898 1" }