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.1.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.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x2case-1.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 cb146059ed335e5d240f4f7843bd2133310847002bac8752d0aa48c23d9ac285
MD5 571e91679ab470819e76f4f9849597c5
BLAKE2b-256 0d17408f21c08e70fa113241f523b76d36a3e5b3ecaf5015426d34130c5896cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x2case-1.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3769973d03b4d210d948c02ee458d3bbe5fb75858110f91581625ee525c5525d
MD5 62c25ba5f34f95d5ddf94f292098fde3
BLAKE2b-256 f9987fdb088c16f255c0b6cb88e2678f5efc7b6ad8ad3818dfa2c17fa8fbab39

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