Skip to main content

Convert test cases between Excel and XMind formats with enhanced features

Project description

Test Case Converter

Convert test cases between Excel and XMind formats.

Installation

pip install testcase-converter

New Features in v0.3.0

  • Added case type field with default value "功能用例"
  • Reordered XMind notes fields to match required sequence
  • Enhanced compatibility for both old and new Excel formats

Usage Examples

As a CLI Tool:

# Excel to XMind
testcase-converter test_cases.xlsx

# XMind to Excel
testcase-converter test_cases.xmind

# 启用日志文件生成(使用简短参数 -l)
testcase-converter -l test_cases.xlsx

# 设置默认车型和优先级(使用简短参数 -v 和 -p)
testcase-converter -v "默认车型" -p "3" test_cases.xlsx

# 仅填充模式(使用简短参数 -f)
testcase-converter -f -v "OTA" -p "0" test_cases.xlsx

# 组合使用所有参数
testcase-converter -l -f -v "OTA" -p "0" test_cases.xmind

As a Python Library:

from testcase_converter import TestCaseConverter, ConversionType

# Auto-detect conversion type
converter = TestCaseConverter("input.xlsx")
converter.convert()

# Explicitly specify conversion type with new options
converter = TestCaseConverter(
    "input.xmind", 
    ConversionType.XMIND_TO_EXCEL,
    enable_logging=True,              # 启用日志文件生成
    default_vehicle_type="默认车型",      # 设置默认车型
    default_priority="3"              # 设置默认优先级
)

# 仅填充模式
converter = TestCaseConverter(
    "input.xlsx",
    ConversionType.FILL_ONLY,         # 设置为仅填充模式
    default_vehicle_type="OTA",       # 设置默认车型
    default_priority="0"              # 设置默认优先级
)
converter.convert()

命令行参数说明

长参数名 短参数名 说明
--enable-logging -l 启用日志文件生成
--default-vehicle-type -v 默认车型,用于填充空的车型字段
--default-priority -p 默认优先级,用于填充空的优先级字段
--fill-only -f 仅填充模式,不转换文件格式
--debug 启用调试模式

Format Details

The converter now automatically adds a case type field with the default value "功能用例" and reorders the fields in XMind notes.

For Excel files:

  • New format includes 9 columns: Module, Case Name, Precondition, Steps, Expected Result, Remark, Case Type, Vehicle Type, Priority
  • Backward compatibility maintained for 7-column and 8-column formats (missing fields will be added with default values)

For XMind files:

  • Fields are now ordered as follows: 【用例类型】功能用例 【车型】OTA 【优先级】1 【前置条件】 【执行步骤】 【预期结果】 【备注】

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

testcase_converter-0.3.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

testcase_converter-0.3.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file testcase_converter-0.3.0.tar.gz.

File metadata

  • Download URL: testcase_converter-0.3.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for testcase_converter-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3335b13c3e273f91a844ba646269d596d665d6dba5aa8bf0c49d04d3384284a3
MD5 fabc23887689a1569775a1348e091f94
BLAKE2b-256 ccaa14429da2635e23bd1125b145af0d4b796c15623f38a7f75d1aa9ed979b9a

See more details on using hashes here.

File details

Details for the file testcase_converter-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for testcase_converter-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1bfc06d203ed81a1bf154e1b14b92ced5be880bb02bbb9577cc6357de5971b9
MD5 5aab62dc22957cd9b7dc0abe55a977fe
BLAKE2b-256 4a50868ce4d4853429d401226dd63221d090ab2985d953010c8c593bdccbf9eb

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