Skip to main content

Xmind to jira test case

Project description

X2Case

X2Case , Xmind 文件转 jira CSV 文件。 支持新版 xmind zen。

一、安装 Install

pip3 install x2case

二、使用方式 Usage

1. to jira csv

import json
import logging

from x2case.func import XmindZenParser
from x2case.jira import xmind_to_jira_csv_file

logging.basicConfig(level=logging.INFO)

xmind_file = 'docs/jira_demo.xmind'
print('Start to convert XMind file: %s' % xmind_file)

# 1、testcases import file
# (1) jira
csv_file = xmind_to_jira_csv_file(xmind_file)
print(f'Convert XMind file to zentao csv file successfully: {xmind_file}')

2. to testcases json file

parser = XmindZenParser(xmind_file)
# (1) testsuite
testsuite_json_file = parser.xmind_2_suite_json_file()
print('Convert XMind file to testsuite json file successfully: %s' % testsuite_json_file)
# (2) testcase
testcase_json_file = parser.xmind_2_case_json_file()
print('Convert XMind file to testcase json file successfully: %s' % testcase_json_file)

3、test dict/json data

# (1) testsuite

test_suite = parser.get_xmind_testsuite_list()
print('Convert XMind to test suits dict data:\n%s' %
      json.dumps(test_suite, indent=2, separators=(',', ': '), ensure_ascii=False))
# (2) testcase
testcases = parser.get_xmind_testcase_list()
print('Convert Xmind to testcases dict data:\n%s' %
      json.dumps(testcases, indent=4, separators=(',', ': '), ensure_ascii=False))

print('Finished conversion, Congratulations!')

三、致谢

X2Case 工具的产生,受益于以下两个开源项目,并在此基础上扩展、优化,受益匪浅,感恩!

  • 1、XMindParser:Parse xmind file to programmable data type (e.g. json, xml). Python 3.x required. Now it supports XmindZen file type as well.
  • 2、Xmind2Testcase:XMind2TestCase 工具,提供了一个高效测试用例设计的解决方案!

(如果本项目对你有帮助的话,也欢迎 star

LICENSE

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x2case-1.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x2case-1.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file x2case-1.2.0.tar.gz.

File metadata

  • Download URL: x2case-1.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for x2case-1.2.0.tar.gz
Algorithm Hash digest
SHA256 981102f716a523fa000a5bbcc444d1963e36b3f56c1a5ae5f1e98e9e2f8ec4b3
MD5 4ebc527062013e2b7e52c0a0bbdb5e07
BLAKE2b-256 aa134f7734933e2b42a3be29545d6ef0b9d0a3308c65e7e6c47ff81b2a4cfdb4

See more details on using hashes here.

File details

Details for the file x2case-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: x2case-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for x2case-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b23ab8e7a1bf1bc7dfbddaca7bf2119e416dd0971f051ad3e023290df8e08bfb
MD5 29f6212e360325fac578d6b390d0ee10
BLAKE2b-256 b1dfe3d6cb89df534ae988fe88a6c5396cd8c464ff8937380267b39490873540

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page