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.3.tar.gz (19.2 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.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x2case-1.2.3.tar.gz
  • Upload date:
  • Size: 19.2 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.3.tar.gz
Algorithm Hash digest
SHA256 1e880c8eca5770794c4eb8c8e4df46ed6e5cc6d1b808d4768794c7f58ac44a5d
MD5 5d0f63115f9023d0c33422a8c6718c09
BLAKE2b-256 0f026348615f5d394d09d9e99bf10738425e320f5e490bef3edb05830f8cf2b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x2case-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2ddeb46e352b3a371f02066083e79778cf1fe1a260248bbd5916b93de7ef8d05
MD5 d70c078ef3b7c263aa27383e4d246d8c
BLAKE2b-256 bc442593dfd0fb4eaed2fe7baa06f4b5858697b6296bc92ae2da232d59ad52d6

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