xmind2testcasezen


Namexmind2testcasezen JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/maiyajj/xmind2testcasezen
SummaryXMind2TestCaseZen基于XMind2TestCase做二次开发,提供了一个高效测试用例设计的解决方案!
upload_time2023-10-17 10:06:38
maintainer
docs_urlNone
authormaiyajj
requires_python>=3.0, <4
licenseMIT
keywords xmind2testcase testcase test testing xmind 思维导图 xmind思维导图
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## [XMind2TestCaseZen](https://github.com/maiyajj/xmind2testcasezen/tree/master#xmind2testcasezen)

> **XMind2TestCaseZen** 工具,提供了一个高效测试用例设计的解决方案!

### 一、区别

[xmind2testcase](https://github.com/zhuifengshen/xmind2testcase/tree/master/xmind2testcase)与[xmind2testcaseZen](https://github.com/maiyajj/xmind2testcasezen)的区别:

- 支持新版本的xmind文件的解析,同时支持旧版本的xmind文件的解析
- 例的展示更加丰富,更加精细。
   - 在保持testcase title的前提下,将非testcase节点的部分提取为Category
   - 不同节点的title链接的展示优化
- 测试模板支持一个测试步骤包含多个预期结果。
- 支持xmind zen

### 二、测试用例模板

### 2.1 用例模板

[新的用例模板](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/XMind%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E6%A8%A1%E6%9D%BF.xmind)[![xmind_testcase_demo](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)

标签(label):**测试用例**、**执行步骤、预期结果**、**前置条件**、**优先级**、**优先级**标签(如:P1)<br />标记(marker):优先级标记,label优先级更高<br />备注:summary。测试用例节点才会被解析。

### 2.2 模板解析规则

- 中心主题默认为产品名称
- 中心主题的第一层会被识别为`testsuite`
- 包含`测试用例`标签的节点的会识别为`testcase`
- `testsuite`- `testcase`之间的节点title被识别为用例的分类(Category)
- `testcase`的子主题包含`前置条件`标签的为`PreConditions`、包含`执行步骤`标签的为`teststep`
- `teststep`的子主题包含`预期结果`标签的为`ExpectResults`,一个执行步骤可以包含多个预期结果。
- `testcase`的优先级可用marker进行标记。也可以通过label进行标记(如P0,priority 1),label的优先级更高
- `testcase`的执行类型通过label定义:`手动`、`自动`。默认为`手动`。
- `testcase`的摘要summary通过`testcase`节点的备注记录
- `testcase`节点包含`ignore`标签时,会被打上一个`ignore`的标记
- 自由主题不会被解析

### 三、模板解析结果

`xmind2testcasezen`解析并渲染到前端的结果如下:![testcase_preview](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)

- Suite表示模块名称。
- Category表示**模块节点**到**测试用例节点**中间包含的这些节点的集合。
- Title表示测试用例名称。
- PreConditions表示前置条件,可以包含多个。
- Attributes包含用例的优先级priority,测试用例节点的备注summary。
- Steps表示执行步骤以及预期结果,一个执行步骤可对应多个预期结果。
- 对于无效的用例,忽略的用例,用户可以选择是否将其展示出来。

### 四、背景

软件测试过程中,最重要、最核心就是测试用例的设计,也是测试童鞋、测试团队日常投入最多时间的工作内容之一。

然而,传统的测试用例设计过程有很多痛点:

-   1、使用Excel表格进行测试用例设计,虽然成本低,但版本管理麻烦,维护更新耗时,用例评审繁琐,过程报表统计难...
-   2、使用TestLink、TestCenter、Redmine等传统测试管理工具,虽然测试用例的执行、管理、统计比较方便,但依然存在编写用例效率不高、思路不够发散、在产品快速迭代过程中比较耗时等问题...
-   3、公司自研测试管理工具,这是个不错的选择,但对于大部分小公司、小团队来说,一方面研发维护成本高,另一方面对技术要有一定要求...
-   4、...

基于这些情况,现在越来越多公司选择使用**思维导图**这种高效的生产力工具进行用例设计,特别是敏捷开发团队。

事实上也证明,思维导图其发散性思维、图形化思维的特点,跟测试用例设计时所需的思维非常吻合,所以在实际工作中极大提升了我们测试用例设计的效率,也非常方便测试用例评审。

但是与此同时,使用思维导图进行测试用例设计的过程中也带来不少问题:

-   1、测试用例难以量化管理、执行情况难以统计;
-   2、测试用例执行结果与BUG管理系统难以打通;
-   3、团队成员用思维导图设计用例的风格各异,沟通成本巨大;
-   4、...

综合以上情况,我们可以发现不同的测试用例设计方式,各有各个的优劣。

那么问题来了,我们能不能将它们各自优点合在一起呢?这样不就可以提升我们的效率了!

于是,这时候 **XMind2TestCaseZen** 就应运而生了,该工具基于 Python 实现,通过制定**测试用例通用模板**, 然后使用 **[XMind](https://www.xmind.cn/)** 这款广为流传且开源的思维导图工具进行用例设计。 其中制定**测试用例通用模板**是一个非常核心的步骤(具体请看[使用指南](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/index.md)),有了通用的测试用例模板,我们就可以在 XMind 文件上解析并提取出测试用例所需的基本信息, 然后合成常见**测试用例管理系统**所需的**用例导入文件**。这样就将 **XMind 设计测试用例的便利**与**常见测试用例系统的高效管理**结合起来了!

当前 **XMind2TestCaseZen** 已实现从 XMind 文件到 TestLink 和 Zentao(禅道) 两大常见用例管理系统的测试用例转换,同时也提供 XMind 文件解析后的两种数据接口 (TestSuites、TestCases两种级别的JSON数据),方便快速与其他测试用例管理系统打通。



### 五、使用示例

#### [1、Web工具示例](https://github.com/maiyajj/xmind2testcasezen/tree/master#1web%E5%B7%A5%E5%85%B7%E7%A4%BA%E4%BE%8B)

[![webtool](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool.png)

#### [2、转换后用例预览](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E8%BD%AC%E6%8D%A2%E5%90%8E%E7%94%A8%E4%BE%8B%E9%A2%84%E8%A7%88)

[![testcase_preview](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)

#### [3、TestLink导入结果示例](https://github.com/maiyajj/xmind2testcasezen/tree/master#3testlink%E5%AF%BC%E5%85%A5%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B)

[![testlink](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/testlink.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/testlink.png)

#### [4、禅道(ZenTao)导入结果示例](https://github.com/maiyajj/xmind2testcasezen/tree/master#4%E7%A6%85%E9%81%93zentao%E5%AF%BC%E5%85%A5%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B)

[![zentao](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/zentao_import_result.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/zentao_import_result.png)

### 六、安装方式

```
pip3 install xmind2testcasezen
```

### 七、版本升级

```
pip3 install -U xmind2testcasezen
```

### 八、使用方式

#### [1、命令行调用](https://github.com/maiyajj/xmind2testcasezen/tree/master#1%E5%91%BD%E4%BB%A4%E8%A1%8C%E8%B0%83%E7%94%A8)

```
Usage:
 xmind2testcasezen [path_to_xmind_file] [-csv] [-xml] [-json]

Example:
 xmind2testcasezen /path/to/testcase.xmind        => output testcase.csv、testcase.xml、testcase.json
 xmind2testcasezen /path/to/testcase.xmind -csv   => output testcase.csv
 xmind2testcasezen /path/to/testcase.xmind -xml   => output testcase.xml
 xmind2testcasezen /path/to/testcase.xmind -json  => output testcase.json
```

#### [2、使用Web界面](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E4%BD%BF%E7%94%A8web%E7%95%8C%E9%9D%A2)

![web_tool_cli](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool_cli.png)

```
Usage:
 xmind2testcasezen [webtool] [port_num]

Example:
 xmind2testcasezen webtool        => launch the web testcase convertion tool locally -> 127.0.0.1:5001
 xmind2testcasezen webtool 8000   => launch the web testcase convertion tool locally -> 127.0.0.1:8000
```

#### [3、API调用](https://github.com/maiyajj/xmind2testcasezen/tree/master#3api%E8%B0%83%E7%94%A8)

```
import json
import xmind
from xmind2testcasezen.zentao import xmind_to_zentao_csv_file
from xmind2testcasezen.testlink import xmind_to_testlink_xml_file
from xmind2testcasezen.services import gen_testcase_to_json_file
from xmind2testcasezen.services import gen_testsuite_to_json_file
from xmind2testcasezen.services import get_testcase_list
from xmind2testcasezen.services import get_testsuite_list


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

    zentao_csv_file = xmind_to_zentao_csv_file(xmind_file)
    print('Convert XMind file to zentao csv file successfully: %s' % zentao_csv_file)

    testlink_xml_file = xmind_to_testlink_xml_file(xmind_file)
    print('Convert XMind file to testlink xml file successfully: %s' % testlink_xml_file)

    testsuite_json_file = gen_testsuite_to_json_file(xmind_file)
    print('Convert XMind file to testsuite json file successfully: %s' % testsuite_json_file)

    testcase_json_file = gen_testcase_to_json_file(xmind_file)
    print('Convert XMind file to testcase json file successfully: %s' % testcase_json_file)

    testsuites = get_testsuite_list(xmind_file)
    print('Convert XMind to testsuits dict data:\n%s' % json.dumps(testsuites, indent=2, separators=(',', ': '), ensure_ascii=False))

    testcases = get_testcase_list(xmind_file)
    print('Convert Xmind to testcases dict data:\n%s' % json.dumps(testcases, indent=4, separators=(',', ': ')))

    workbook = xmind.load(xmind_file)
    print('Convert XMind to Json data:\n%s' % json.dumps(workbook.getData(), indent=2, separators=(',', ': '), ensure_ascii=False))

    print('Finished conversion, Congratulations!')


if __name__ == '__main__':
    main()
```

#### [4、XMind用例文件转为JSON数据](https://github.com/maiyajj/xmind2testcasezen/tree/master#4xmind%E7%94%A8%E4%BE%8B%E6%96%87%E4%BB%B6%E8%BD%AC%E4%B8%BAjson%E6%95%B0%E6%8D%AE)

[![xmind_testcase_demo](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)

##### [(1)转为TestCase JSON数据](https://github.com/maiyajj/xmind2testcasezen/tree/master#1%E8%BD%AC%E4%B8%BAtestcase-json%E6%95%B0%E6%8D%AE)

```
from xmind2testcasezen.services import get_testcase_list
xmind_file = 'docs/xmind_testcase_demo.xmind'
testcases = get_testcase_list(xmind_file)
print(testcases)


Output:

[
    {                                                # 测试用例
        "name": "测试用例1",                           # 用例标题
        "version": 1,                                 # 用例版本
        "summary": "测试用例1",                        # 用例摘要
        "preconditions": "前置条件",                   # 前置条件
        "execution_type": 1,                          # 用例执行类型(1:手动、2:自动)
        "importance": 1,                              # 优先级(1:高、2:中、3:低)
        "estimated_exec_duration": 3,                 # 预计执行时间(分钟)
        "status": 7,                                  # 用例状态(1:草稿、2:待评审、3:评审中、4:重做、5、废弃、6:feature、7:终稿)
        "steps": [                                    # 测试步骤列表
            {
                "step_number": 1,                     # 编号
                "actions": "测试步骤1",                 # 步骤内容
                "expectedresults": "预期结果1",         # 预期结果
                "execution_type": 1                    # 执行类型(1:手动,2:自动)
            }, 
            {
                "step_number": 2, 
                "actions": "测试步骤2", 
                "expectedresults": "预期结果2", 
                "execution_type": 1
            }
        ], 
        "product": "我是产品名",                          # 产品名称
        "suite": "我是模块名(测试集1)"                     # 测试集(模块名)
    }, 
    {
        "name": "测试用例2", 
        "version": 1, 
        "summary": "测试用例2", 
        "preconditions": "前置条件", 
        "execution_type": 1, 
        "importance": 1, 
        "estimated_exec_duration": 3, 
        "status": 7, 
        "steps": [
            {
                "step_number": 1, 
                "actions": "测试步骤1", 
                "expectedresults": "预期结果1", 
                "execution_type": 1
            }, 
            {
                "step_number": 2, 
                "actions": "测试步骤2(预期结果2可以为空)", 
                "expectedresults": "", 
                "execution_type": 1
            }, 
            {
                "step_number": 3, 
                "actions": "测试步骤3", 
                "expectedresults": "预期结果3", 
                "execution_type": 1
            }, 
            {
                "step_number": 4, 
                "actions": "测试步骤4", 
                "expectedresults": "预期结果4", 
                "execution_type": 1
            }
        ], 
        "product": "我是产品名", 
        "suite": "我是模块名(测试集1)"
    }, 
    {
        "name": "测试用例3(测试步骤和预期结果可以都为空)", 
        "version": 1, 
        "summary": "测试用例3(测试步骤和预期结果可以都为空)", 
        "preconditions": "无", 
        "execution_type": 1, 
        "importance": 2, 
        "estimated_exec_duration": 3, 
        "status": 7, 
        "steps": [ ], 
        "product": "我是产品名", 
        "suite": "我是模块名(测试集1)"
    }, 
    {
        "name": "测试步骤2(优先级默认为中)", 
        "version": 1, 
        "summary": "测试步骤2(优先级默认为中)", 
        "preconditions": "无", 
        "execution_type": 1, 
        "importance": 3, 
        "estimated_exec_duration": 3, 
        "status": 7, 
        "steps": [
            {
                "step_number": 1, 
                "actions": "测试步骤1", 
                "expectedresults": "预期结果1", 
                "execution_type": 1
            }, 
            {
                "step_number": 2, 
                "actions": "测试步骤3", 
                "expectedresults": "", 
                "execution_type": 1
            }
        ], 
        "product": "我是产品名", 
        "suite": "我是模块名(测试集2)"
    }, 
    {
        "name": "测试用例3(前置条件默认为空) 无设置优先级,这里加入用例标题", 
        "version": 1, 
        "summary": "测试用例3(前置条件默认为空) 无设置优先级,这里加入用例标题", 
        "preconditions": "无", 
        "execution_type": 1, 
        "importance": 2, 
        "estimated_exec_duration": 3, 
        "status": 7, 
        "steps": [ ], 
        "product": "我是产品名", 
        "suite": "我是模块名(测试集2)"
    }
]
```

测试用例数据增加执行结果字段:result,示例如下:

[![测试用例数据](https://github.com/maiyajj/xmind2testcasezen/raw/master/webtool/static/guide/testcase_json_demo.png)](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/testcase_json_demo.png)

详情查看[使用指南](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/index.md),参考示例:[testcase json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_to_testcase_json.json)

##### [(2)转为TestSuite JSON数据](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E8%BD%AC%E4%B8%BAtestsuite-json%E6%95%B0%E6%8D%AE)

```
from xmind2testcasezen.services import get_testsuite_list
xmind_file = 'docs/xmind_testcase_demo.xmind'
testsuites = get_testsuite_list(xmind_file)
print(testsuites)


Output:

[
  {                                                 # XMind画布(Sheet)列表
    "name": "我是产品名",                             # 产品名称
    "details": null,                                 # 产品摘要
    "testcase_list": [],                             # 用例列表
    "sub_suites": [                                  # 用例集列表
      {
        "name": "我是模块名(测试集1)",                  # 用例集1名称(模块名)
        "details": null,                             # 用例集摘要
        "testcase_list": [                           # 用例列表
          {                                          # 具体用例
            "name": "测试用例1",
            "version": 1,
            "summary": "测试用例1",
            "preconditions": "前置条件",
            "execution_type": 1,
            "importance": 1,
            "estimated_exec_duration": 3,
            "status": 7,
            "steps": [
              {
                "step_number": 1,
                "actions": "测试步骤1",
                "expectedresults": "预期结果1",
                "execution_type": 1
              },
              {
                "step_number": 2,
                "actions": "测试步骤2",
                "expectedresults": "预期结果2",
                "execution_type": 1
              }
            ]
          },
          {
            "name": "测试用例2",
            "version": 1,
            "summary": "测试用例2",
            "preconditions": "前置条件",
            "execution_type": 1,
            "importance": 1,
            "estimated_exec_duration": 3,
            "status": 7,
            "steps": [
              {
                "step_number": 1,
                "actions": "测试步骤1",
                "expectedresults": "预期结果1",
                "execution_type": 1
              },
              {
                "step_number": 2,
                "actions": "测试步骤2(预期结果2可以为空)",
                "expectedresults": "",
                "execution_type": 1
              },
              {
                "step_number": 3,
                "actions": "测试步骤3",
                "expectedresults": "预期结果3",
                "execution_type": 1
              },
              {
                "step_number": 4,
                "actions": "测试步骤4",
                "expectedresults": "预期结果4",
                "execution_type": 1
              }
            ]
          },
          {
            "name": "测试用例3(测试步骤和预期结果可以都为空)",
            "version": 1,
            "summary": "测试用例3(测试步骤和预期结果可以都为空)",
            "preconditions": "无",
            "execution_type": 1,
            "importance": 2,
            "estimated_exec_duration": 3,
            "status": 7,
            "steps": []
          }
        ],
        "sub_suites": []                            # 用例集中可以包含子用例集(目前只要产品类别下有用例集)
      },
      {
        "name": "我是模块名(测试集2)",                  # 用例集2名称(模块名)
        "details": "测试集摘要(详情)",
        "testcase_list": [
          {
            "name": "测试步骤2(优先级默认为中)",
            "version": 1,
            "summary": "测试步骤2(优先级默认为中)",
            "preconditions": "无",
            "execution_type": 1,
            "importance": 3,
            "estimated_exec_duration": 3,
            "status": 7,
            "steps": [
              {
                "step_number": 1,
                "actions": "测试步骤1",
                "expectedresults": "预期结果1",
                "execution_type": 1
              },
              {
                "step_number": 2,
                "actions": "测试步骤3",
                "expectedresults": "",
                "execution_type": 1
              }
            ]
          },
          {
            "name": "测试用例3(前置条件默认为空) 无设置优先级,这里加入用例标题",
            "version": 1,
            "summary": "测试用例3(前置条件默认为空) 无设置优先级,这里加入用例标题",
            "preconditions": "无",
            "execution_type": 1,
            "importance": 2,
            "estimated_exec_duration": 3,
            "status": 7,
            "steps": []
          }
        ],
        "sub_suites": []
      }
    ]
  }
]
```

TestSuite增加执行结果统计字段:statistics,示例如下:

[![测试用例数据](https://github.com/maiyajj/xmind2testcasezen/raw/master/webtool/static/guide/testsuite_json_demo.png)](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/testsuite_json_demo.png)

参考示例:[testsuite json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_to_testsuite_json.json)

##### [(3)XMind文件转换为JSON数据](https://github.com/maiyajj/xmind2testcasezen/tree/master#3xmind%E6%96%87%E4%BB%B6%E8%BD%AC%E6%8D%A2%E4%B8%BAjson%E6%95%B0%E6%8D%AE)

以上(1)TestCase数据、(2)TestSuite数据的获取,其实是基于\*\*[XMind](https://github.com/zhuifengshen/xmind)\*\*这个工具,对XMind文件进行解析和数据提取,然后转换而来。 这个工具是在设计XMind2TestCaseZen时,针对XMind单独抽取出来的库,提供了XMind思维导图创建、解析、更新的一系列方法。使用它可以直接将XMind文件转换为JSON数据:

```
import xmind
xmind_file = 'docs/xmind_testcase_demo.xmind'
workbook = xmind.load(xmind_file)
data = workbook.getData()
print(data)


Output:

[
  {                                                    # XMind画布(sheet)列表
    "id": "7hmnj6ahp0lonp4k2hodfok24f",                # 画布ID
    "title": "画布 1",                                  # 画布名称
    "topic": {                                         # 中心主题
      "id": "7c8av5gt8qfbac641lth4g1p67",              # 主题ID
      "link": null,                                    # 主题上的超链接信息
      "title": "我是产品名",                             # 主题名称
      "note": null,                                    # 主题上的备注信息
      "label": null,                                   # 主题上标签信息
      "comment": null,                                 # 主题上的批注(评论)信息
      "markers": [],                                   # 主题上的图标信息
      "topics": [                                      # 子主题列表
        {
          "id": "2rj4ek3nn4sk0lc4pje3gvgv9k",
          "link": null,
          "title": "我是模块名(测试集1)",                  # 子主题1
          "note": null,
          "label": null,
          "comment": null,
          "markers": [],
          "topics": [                                    # 子主题下的子主题列表
            {
              "id": "3hjj43s7rv66uncr1srl3qsboi",
              "link": null,
              "title": "测试用例1",
              "note": "前置条件\n",
              "label": "手动(执行方式默认为手动)",
              "comment": null,
              "markers": [
                "priority-1"
              ],
              "topics": [
                {
                  "id": "3djn37j1fdc6081de319slf035",
                  "link": null,
                  "title": "测试步骤1",
                  "note": null,
                  "label": null,
                  "comment": null,
                  "markers": [],
                  "topics": [
                    {
                      "id": "7v0f1152popou38ndaaamt49l5",
                      "link": null,
                      "title": "预期结果1",
                      "note": null,
                      "label": null,
                      "comment": null,
                      "markers": []
                    }
                  ]
                },
                {
                  "id": "2srtqqjp818clkk1drm233lank",
                  "link": null,
                  "title": "测试步骤2",
                  "note": null,
                  "label": null,
                  "comment": null,
                  "markers": [],
                  "topics": [
                    {
                      "id": "4jlbo280urmid3qkd01j7h8jnq",
                      "link": null,
                      "title": "预期结果2",
                      "note": null,
                      "label": null,
                      "comment": null,
                      "markers": []
                    }
                  ]
                }
              ]
            },
            ...
          ]
        },
        ...
      ]
    }
  }
]
```

具体参考:[xmind\_testcase\_demo.json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_testcase_demo.json)

### 九、自动化发布:一键打 Tag 并上传至 PYPI

每次在 \_\_ about \_\_.py 更新版本号后,运行以下命令,实现自动化更新打包上传至 [PYPI](https://pypi.org/) ,同时根据其版本号自动打 Tag 并推送到仓库:

[![upload_pypi](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/pypi_upload.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/pypi_upload.png)

### 十、CHANGELOG

```
v1.0.0
1、XMind用例模板定义和解析;
2、XMind用例转换为TestLink用例文件;

v1.1.0
1、XMind用例文件转换为禅道用例文件;
2、添加一键上传PYPI功能;

v1.2.0
1、添加Web工具进行用例转换;
2、添加用户使用指南;

v1.3.0
1、XMind中支持标识测试用例执行结果;
2、TestCase、TestSuite中添加用例执行结果统计数据;
3、完善用户使用指南;

v1.5.0
1、支持通过标签设置用例类型(自动 or 手动);
2、支持导出文件中文显示;
3、增加命令运行指引;
4、修复服务器远程部署无法访问问题;
5、取消测试用例关键字默认设置;

v1.6.0
1、支持Xmind Zen版本
2、支持用例操作步骤多个预期结果

备注:XMind2TestcaseZen针对XMind经典系列版本,同时也支持XMind Zen版本!
```

### 十一、致谢

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

-   1、**[XMind](https://github.com/zhuifengshen/xmind)**:XMind思维导图创建、解析、更新的一站式解决方案(Python实现)!
-   2、**[xmind2testlink](https://github.com/tobyqin/xmind2testlink)**:践行了XMind通用测试用例模板设计思路,同时提供了Web转换工具!
-   3、**[TestLink](http://www.testlink.org/)**:提供了完整的测试用例管理流程和文档;
-   4、**[禅道开源版(ZenTao)](https://www.zentao.net/)**:提供了完整的项目管理流程、文档和用户交流释疑群;

得益于开源,也将坚持开源,并为努力开源贡献自己的点滴之力。后续,将继续根据实际项目需要,定期进行更新维护

[![QA之禅](https://camo.githubusercontent.com/bc2aac4b8cddac2cbbd449a37a351d17c4616204172180b865b8be3b4c4b67bc/687474703a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f3133393538312d323763363033306261373230383436662e6a70673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430)](https://camo.githubusercontent.com/bc2aac4b8cddac2cbbd449a37a351d17c4616204172180b865b8be3b4c4b67bc/687474703a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f3133393538312d323763363033306261373230383436662e6a70673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430)

### [LICENSE](https://github.com/maiyajj/xmind2testcasezen/tree/master#license)

```
MIT License

Copyright (c) 2019 Devin https://zhangchuzhao.site
Copyright (c) 2017 Toby Qin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/maiyajj/xmind2testcasezen",
    "name": "xmind2testcasezen",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0, <4",
    "maintainer_email": "",
    "keywords": "xmind2testCase, testcase, test, testing, xmind, \u601d\u7ef4\u5bfc\u56fe, XMind\u601d\u7ef4\u5bfc\u56fe",
    "author": "maiyajj",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/7e/c9/d0c6a133b4713908b5e55f75f0aadc9bc4b32166d9f9f548df537080a812/xmind2testcasezen-0.0.5.tar.gz",
    "platform": null,
    "description": "## [XMind2TestCaseZen](https://github.com/maiyajj/xmind2testcasezen/tree/master#xmind2testcasezen)\r\n\r\n> **XMind2TestCaseZen** \u5de5\u5177\uff0c\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9ad8\u6548\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u7684\u89e3\u51b3\u65b9\u6848\uff01\r\n\r\n### \u4e00\u3001\u533a\u522b\r\n\r\n[xmind2testcase](https://github.com/zhuifengshen/xmind2testcase/tree/master/xmind2testcase)\u4e0e[xmind2testcaseZen](https://github.com/maiyajj/xmind2testcasezen)\u7684\u533a\u522b\uff1a\r\n\r\n- \u652f\u6301\u65b0\u7248\u672c\u7684xmind\u6587\u4ef6\u7684\u89e3\u6790\uff0c\u540c\u65f6\u652f\u6301\u65e7\u7248\u672c\u7684xmind\u6587\u4ef6\u7684\u89e3\u6790\r\n- \u4f8b\u7684\u5c55\u793a\u66f4\u52a0\u4e30\u5bcc\uff0c\u66f4\u52a0\u7cbe\u7ec6\u3002\r\n   - \u5728\u4fdd\u6301testcase title\u7684\u524d\u63d0\u4e0b\uff0c\u5c06\u975etestcase\u8282\u70b9\u7684\u90e8\u5206\u63d0\u53d6\u4e3aCategory\r\n   - \u4e0d\u540c\u8282\u70b9\u7684title\u94fe\u63a5\u7684\u5c55\u793a\u4f18\u5316\r\n- \u6d4b\u8bd5\u6a21\u677f\u652f\u6301\u4e00\u4e2a\u6d4b\u8bd5\u6b65\u9aa4\u5305\u542b\u591a\u4e2a\u9884\u671f\u7ed3\u679c\u3002\r\n- \u652f\u6301xmind zen\r\n\r\n### \u4e8c\u3001\u6d4b\u8bd5\u7528\u4f8b\u6a21\u677f\r\n\r\n### 2.1 \u7528\u4f8b\u6a21\u677f\r\n\r\n[\u65b0\u7684\u7528\u4f8b\u6a21\u677f](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/XMind%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E6%A8%A1%E6%9D%BF.xmind)[![xmind_testcase_demo](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)\r\n\r\n\u6807\u7b7e\uff08label\uff09\uff1a**\u6d4b\u8bd5\u7528\u4f8b**\u3001**\u6267\u884c\u6b65\u9aa4\u3001\u9884\u671f\u7ed3\u679c**\u3001**\u524d\u7f6e\u6761\u4ef6**\u3001**\u4f18\u5148\u7ea7**\u3001**\u4f18\u5148\u7ea7**\u6807\u7b7e\uff08\u5982\uff1aP1\uff09<br />\u6807\u8bb0\uff08marker\uff09\uff1a\u4f18\u5148\u7ea7\u6807\u8bb0\uff0clabel\u4f18\u5148\u7ea7\u66f4\u9ad8<br />\u5907\u6ce8\uff1asummary\u3002\u6d4b\u8bd5\u7528\u4f8b\u8282\u70b9\u624d\u4f1a\u88ab\u89e3\u6790\u3002\r\n\r\n### 2.2 \u6a21\u677f\u89e3\u6790\u89c4\u5219\r\n\r\n- \u4e2d\u5fc3\u4e3b\u9898\u9ed8\u8ba4\u4e3a\u4ea7\u54c1\u540d\u79f0\r\n- \u4e2d\u5fc3\u4e3b\u9898\u7684\u7b2c\u4e00\u5c42\u4f1a\u88ab\u8bc6\u522b\u4e3a`testsuite`\r\n- \u5305\u542b`\u6d4b\u8bd5\u7528\u4f8b`\u6807\u7b7e\u7684\u8282\u70b9\u7684\u4f1a\u8bc6\u522b\u4e3a`testcase`\r\n- `testsuite`- `testcase`\u4e4b\u95f4\u7684\u8282\u70b9title\u88ab\u8bc6\u522b\u4e3a\u7528\u4f8b\u7684\u5206\u7c7b\uff08Category\uff09\r\n- `testcase`\u7684\u5b50\u4e3b\u9898\u5305\u542b`\u524d\u7f6e\u6761\u4ef6`\u6807\u7b7e\u7684\u4e3a`PreConditions`\u3001\u5305\u542b`\u6267\u884c\u6b65\u9aa4`\u6807\u7b7e\u7684\u4e3a`teststep`\r\n- `teststep`\u7684\u5b50\u4e3b\u9898\u5305\u542b`\u9884\u671f\u7ed3\u679c`\u6807\u7b7e\u7684\u4e3a`ExpectResults`\uff0c\u4e00\u4e2a\u6267\u884c\u6b65\u9aa4\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u9884\u671f\u7ed3\u679c\u3002\r\n- `testcase`\u7684\u4f18\u5148\u7ea7\u53ef\u7528marker\u8fdb\u884c\u6807\u8bb0\u3002\u4e5f\u53ef\u4ee5\u901a\u8fc7label\u8fdb\u884c\u6807\u8bb0\uff08\u5982P0\uff0cpriority 1\uff09\uff0clabel\u7684\u4f18\u5148\u7ea7\u66f4\u9ad8\r\n- `testcase`\u7684\u6267\u884c\u7c7b\u578b\u901a\u8fc7label\u5b9a\u4e49\uff1a`\u624b\u52a8`\u3001`\u81ea\u52a8`\u3002\u9ed8\u8ba4\u4e3a`\u624b\u52a8`\u3002\r\n- `testcase`\u7684\u6458\u8981summary\u901a\u8fc7`testcase`\u8282\u70b9\u7684\u5907\u6ce8\u8bb0\u5f55\r\n- `testcase`\u8282\u70b9\u5305\u542b`ignore`\u6807\u7b7e\u65f6\uff0c\u4f1a\u88ab\u6253\u4e0a\u4e00\u4e2a`ignore`\u7684\u6807\u8bb0\r\n- \u81ea\u7531\u4e3b\u9898\u4e0d\u4f1a\u88ab\u89e3\u6790\r\n\r\n### \u4e09\u3001\u6a21\u677f\u89e3\u6790\u7ed3\u679c\r\n\r\n`xmind2testcasezen`\u89e3\u6790\u5e76\u6e32\u67d3\u5230\u524d\u7aef\u7684\u7ed3\u679c\u5982\u4e0b\uff1a![testcase_preview](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)\r\n\r\n- Suite\u8868\u793a\u6a21\u5757\u540d\u79f0\u3002\r\n- Category\u8868\u793a**\u6a21\u5757\u8282\u70b9**\u5230**\u6d4b\u8bd5\u7528\u4f8b\u8282\u70b9**\u4e2d\u95f4\u5305\u542b\u7684\u8fd9\u4e9b\u8282\u70b9\u7684\u96c6\u5408\u3002\r\n- Title\u8868\u793a\u6d4b\u8bd5\u7528\u4f8b\u540d\u79f0\u3002\r\n- PreConditions\u8868\u793a\u524d\u7f6e\u6761\u4ef6\uff0c\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u3002\r\n- Attributes\u5305\u542b\u7528\u4f8b\u7684\u4f18\u5148\u7ea7priority\uff0c\u6d4b\u8bd5\u7528\u4f8b\u8282\u70b9\u7684\u5907\u6ce8summary\u3002\r\n- Steps\u8868\u793a\u6267\u884c\u6b65\u9aa4\u4ee5\u53ca\u9884\u671f\u7ed3\u679c\uff0c\u4e00\u4e2a\u6267\u884c\u6b65\u9aa4\u53ef\u5bf9\u5e94\u591a\u4e2a\u9884\u671f\u7ed3\u679c\u3002\r\n- \u5bf9\u4e8e\u65e0\u6548\u7684\u7528\u4f8b\uff0c\u5ffd\u7565\u7684\u7528\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u5c06\u5176\u5c55\u793a\u51fa\u6765\u3002\r\n\r\n### \u56db\u3001\u80cc\u666f\r\n\r\n\u8f6f\u4ef6\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u6700\u91cd\u8981\u3001\u6700\u6838\u5fc3\u5c31\u662f\u6d4b\u8bd5\u7528\u4f8b\u7684\u8bbe\u8ba1\uff0c\u4e5f\u662f\u6d4b\u8bd5\u7ae5\u978b\u3001\u6d4b\u8bd5\u56e2\u961f\u65e5\u5e38\u6295\u5165\u6700\u591a\u65f6\u95f4\u7684\u5de5\u4f5c\u5185\u5bb9\u4e4b\u4e00\u3002\r\n\r\n\u7136\u800c\uff0c\u4f20\u7edf\u7684\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u8fc7\u7a0b\u6709\u5f88\u591a\u75db\u70b9\uff1a\r\n\r\n-   1\u3001\u4f7f\u7528Excel\u8868\u683c\u8fdb\u884c\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\uff0c\u867d\u7136\u6210\u672c\u4f4e\uff0c\u4f46\u7248\u672c\u7ba1\u7406\u9ebb\u70e6\uff0c\u7ef4\u62a4\u66f4\u65b0\u8017\u65f6\uff0c\u7528\u4f8b\u8bc4\u5ba1\u7e41\u7410\uff0c\u8fc7\u7a0b\u62a5\u8868\u7edf\u8ba1\u96be...\r\n-   2\u3001\u4f7f\u7528TestLink\u3001TestCenter\u3001Redmine\u7b49\u4f20\u7edf\u6d4b\u8bd5\u7ba1\u7406\u5de5\u5177\uff0c\u867d\u7136\u6d4b\u8bd5\u7528\u4f8b\u7684\u6267\u884c\u3001\u7ba1\u7406\u3001\u7edf\u8ba1\u6bd4\u8f83\u65b9\u4fbf\uff0c\u4f46\u4f9d\u7136\u5b58\u5728\u7f16\u5199\u7528\u4f8b\u6548\u7387\u4e0d\u9ad8\u3001\u601d\u8def\u4e0d\u591f\u53d1\u6563\u3001\u5728\u4ea7\u54c1\u5feb\u901f\u8fed\u4ee3\u8fc7\u7a0b\u4e2d\u6bd4\u8f83\u8017\u65f6\u7b49\u95ee\u9898...\r\n-   3\u3001\u516c\u53f8\u81ea\u7814\u6d4b\u8bd5\u7ba1\u7406\u5de5\u5177\uff0c\u8fd9\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u4f46\u5bf9\u4e8e\u5927\u90e8\u5206\u5c0f\u516c\u53f8\u3001\u5c0f\u56e2\u961f\u6765\u8bf4\uff0c\u4e00\u65b9\u9762\u7814\u53d1\u7ef4\u62a4\u6210\u672c\u9ad8\uff0c\u53e6\u4e00\u65b9\u9762\u5bf9\u6280\u672f\u8981\u6709\u4e00\u5b9a\u8981\u6c42...\r\n-   4\u3001...\r\n\r\n\u57fa\u4e8e\u8fd9\u4e9b\u60c5\u51b5\uff0c\u73b0\u5728\u8d8a\u6765\u8d8a\u591a\u516c\u53f8\u9009\u62e9\u4f7f\u7528**\u601d\u7ef4\u5bfc\u56fe**\u8fd9\u79cd\u9ad8\u6548\u7684\u751f\u4ea7\u529b\u5de5\u5177\u8fdb\u884c\u7528\u4f8b\u8bbe\u8ba1\uff0c\u7279\u522b\u662f\u654f\u6377\u5f00\u53d1\u56e2\u961f\u3002\r\n\r\n\u4e8b\u5b9e\u4e0a\u4e5f\u8bc1\u660e\uff0c\u601d\u7ef4\u5bfc\u56fe\u5176\u53d1\u6563\u6027\u601d\u7ef4\u3001\u56fe\u5f62\u5316\u601d\u7ef4\u7684\u7279\u70b9\uff0c\u8ddf\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u65f6\u6240\u9700\u7684\u601d\u7ef4\u975e\u5e38\u543b\u5408\uff0c\u6240\u4ee5\u5728\u5b9e\u9645\u5de5\u4f5c\u4e2d\u6781\u5927\u63d0\u5347\u4e86\u6211\u4eec\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u7684\u6548\u7387\uff0c\u4e5f\u975e\u5e38\u65b9\u4fbf\u6d4b\u8bd5\u7528\u4f8b\u8bc4\u5ba1\u3002\r\n\r\n\u4f46\u662f\u4e0e\u6b64\u540c\u65f6\uff0c\u4f7f\u7528\u601d\u7ef4\u5bfc\u56fe\u8fdb\u884c\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u7684\u8fc7\u7a0b\u4e2d\u4e5f\u5e26\u6765\u4e0d\u5c11\u95ee\u9898\uff1a\r\n\r\n-   1\u3001\u6d4b\u8bd5\u7528\u4f8b\u96be\u4ee5\u91cf\u5316\u7ba1\u7406\u3001\u6267\u884c\u60c5\u51b5\u96be\u4ee5\u7edf\u8ba1\uff1b\r\n-   2\u3001\u6d4b\u8bd5\u7528\u4f8b\u6267\u884c\u7ed3\u679c\u4e0eBUG\u7ba1\u7406\u7cfb\u7edf\u96be\u4ee5\u6253\u901a\uff1b\r\n-   3\u3001\u56e2\u961f\u6210\u5458\u7528\u601d\u7ef4\u5bfc\u56fe\u8bbe\u8ba1\u7528\u4f8b\u7684\u98ce\u683c\u5404\u5f02\uff0c\u6c9f\u901a\u6210\u672c\u5de8\u5927\uff1b\r\n-   4\u3001...\r\n\r\n\u7efc\u5408\u4ee5\u4e0a\u60c5\u51b5\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0\u4e0d\u540c\u7684\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u65b9\u5f0f\uff0c\u5404\u6709\u5404\u4e2a\u7684\u4f18\u52a3\u3002\r\n\r\n\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u6211\u4eec\u80fd\u4e0d\u80fd\u5c06\u5b83\u4eec\u5404\u81ea\u4f18\u70b9\u5408\u5728\u4e00\u8d77\u5462\uff1f\u8fd9\u6837\u4e0d\u5c31\u53ef\u4ee5\u63d0\u5347\u6211\u4eec\u7684\u6548\u7387\u4e86\uff01\r\n\r\n\u4e8e\u662f\uff0c\u8fd9\u65f6\u5019 **XMind2TestCaseZen** \u5c31\u5e94\u8fd0\u800c\u751f\u4e86\uff0c\u8be5\u5de5\u5177\u57fa\u4e8e Python \u5b9e\u73b0\uff0c\u901a\u8fc7\u5236\u5b9a**\u6d4b\u8bd5\u7528\u4f8b\u901a\u7528\u6a21\u677f**\uff0c \u7136\u540e\u4f7f\u7528 **[XMind](https://www.xmind.cn/)** \u8fd9\u6b3e\u5e7f\u4e3a\u6d41\u4f20\u4e14\u5f00\u6e90\u7684\u601d\u7ef4\u5bfc\u56fe\u5de5\u5177\u8fdb\u884c\u7528\u4f8b\u8bbe\u8ba1\u3002 \u5176\u4e2d\u5236\u5b9a**\u6d4b\u8bd5\u7528\u4f8b\u901a\u7528\u6a21\u677f**\u662f\u4e00\u4e2a\u975e\u5e38\u6838\u5fc3\u7684\u6b65\u9aa4\uff08\u5177\u4f53\u8bf7\u770b[\u4f7f\u7528\u6307\u5357](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/index.md)\uff09\uff0c\u6709\u4e86\u901a\u7528\u7684\u6d4b\u8bd5\u7528\u4f8b\u6a21\u677f\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5728 XMind \u6587\u4ef6\u4e0a\u89e3\u6790\u5e76\u63d0\u53d6\u51fa\u6d4b\u8bd5\u7528\u4f8b\u6240\u9700\u7684\u57fa\u672c\u4fe1\u606f\uff0c \u7136\u540e\u5408\u6210\u5e38\u89c1**\u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406\u7cfb\u7edf**\u6240\u9700\u7684**\u7528\u4f8b\u5bfc\u5165\u6587\u4ef6**\u3002\u8fd9\u6837\u5c31\u5c06 **XMind \u8bbe\u8ba1\u6d4b\u8bd5\u7528\u4f8b\u7684\u4fbf\u5229**\u4e0e**\u5e38\u89c1\u6d4b\u8bd5\u7528\u4f8b\u7cfb\u7edf\u7684\u9ad8\u6548\u7ba1\u7406**\u7ed3\u5408\u8d77\u6765\u4e86\uff01\r\n\r\n\u5f53\u524d **XMind2TestCaseZen** \u5df2\u5b9e\u73b0\u4ece XMind \u6587\u4ef6\u5230 TestLink \u548c Zentao(\u7985\u9053) \u4e24\u5927\u5e38\u89c1\u7528\u4f8b\u7ba1\u7406\u7cfb\u7edf\u7684\u6d4b\u8bd5\u7528\u4f8b\u8f6c\u6362\uff0c\u540c\u65f6\u4e5f\u63d0\u4f9b XMind \u6587\u4ef6\u89e3\u6790\u540e\u7684\u4e24\u79cd\u6570\u636e\u63a5\u53e3 \uff08TestSuites\u3001TestCases\u4e24\u79cd\u7ea7\u522b\u7684JSON\u6570\u636e\uff09\uff0c\u65b9\u4fbf\u5feb\u901f\u4e0e\u5176\u4ed6\u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406\u7cfb\u7edf\u6253\u901a\u3002\r\n\r\n\r\n\r\n### \u4e94\u3001\u4f7f\u7528\u793a\u4f8b\r\n\r\n#### [1\u3001Web\u5de5\u5177\u793a\u4f8b](https://github.com/maiyajj/xmind2testcasezen/tree/master#1web%E5%B7%A5%E5%85%B7%E7%A4%BA%E4%BE%8B)\r\n\r\n[![webtool](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool.png)\r\n\r\n#### [2\u3001\u8f6c\u6362\u540e\u7528\u4f8b\u9884\u89c8](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E8%BD%AC%E6%8D%A2%E5%90%8E%E7%94%A8%E4%BE%8B%E9%A2%84%E8%A7%88)\r\n\r\n[![testcase_preview](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_to_testcase_preview.png)\r\n\r\n#### [3\u3001TestLink\u5bfc\u5165\u7ed3\u679c\u793a\u4f8b](https://github.com/maiyajj/xmind2testcasezen/tree/master#3testlink%E5%AF%BC%E5%85%A5%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B)\r\n\r\n[![testlink](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/testlink.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/testlink.png)\r\n\r\n#### [4\u3001\u7985\u9053\uff08ZenTao\uff09\u5bfc\u5165\u7ed3\u679c\u793a\u4f8b](https://github.com/maiyajj/xmind2testcasezen/tree/master#4%E7%A6%85%E9%81%93zentao%E5%AF%BC%E5%85%A5%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B)\r\n\r\n[![zentao](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/zentao_import_result.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/zentao_import_result.png)\r\n\r\n### \u516d\u3001\u5b89\u88c5\u65b9\u5f0f\r\n\r\n```\r\npip3 install xmind2testcasezen\r\n```\r\n\r\n### \u4e03\u3001\u7248\u672c\u5347\u7ea7\r\n\r\n```\r\npip3 install -U xmind2testcasezen\r\n```\r\n\r\n### \u516b\u3001\u4f7f\u7528\u65b9\u5f0f\r\n\r\n#### [1\u3001\u547d\u4ee4\u884c\u8c03\u7528](https://github.com/maiyajj/xmind2testcasezen/tree/master#1%E5%91%BD%E4%BB%A4%E8%A1%8C%E8%B0%83%E7%94%A8)\r\n\r\n```\r\nUsage:\r\n xmind2testcasezen [path_to_xmind_file] [-csv] [-xml] [-json]\r\n\r\nExample:\r\n xmind2testcasezen /path/to/testcase.xmind        => output testcase.csv\u3001testcase.xml\u3001testcase.json\r\n xmind2testcasezen /path/to/testcase.xmind -csv   => output testcase.csv\r\n xmind2testcasezen /path/to/testcase.xmind -xml   => output testcase.xml\r\n xmind2testcasezen /path/to/testcase.xmind -json  => output testcase.json\r\n```\r\n\r\n#### [2\u3001\u4f7f\u7528Web\u754c\u9762](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E4%BD%BF%E7%94%A8web%E7%95%8C%E9%9D%A2)\r\n\r\n![web_tool_cli](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/webtool_cli.png)\r\n\r\n```\r\nUsage:\r\n xmind2testcasezen [webtool] [port_num]\r\n\r\nExample:\r\n xmind2testcasezen webtool        => launch the web testcase convertion tool locally -> 127.0.0.1:5001\r\n xmind2testcasezen webtool 8000   => launch the web testcase convertion tool locally -> 127.0.0.1:8000\r\n```\r\n\r\n#### [3\u3001API\u8c03\u7528](https://github.com/maiyajj/xmind2testcasezen/tree/master#3api%E8%B0%83%E7%94%A8)\r\n\r\n```\r\nimport json\r\nimport xmind\r\nfrom xmind2testcasezen.zentao import xmind_to_zentao_csv_file\r\nfrom xmind2testcasezen.testlink import xmind_to_testlink_xml_file\r\nfrom xmind2testcasezen.services import gen_testcase_to_json_file\r\nfrom xmind2testcasezen.services import gen_testsuite_to_json_file\r\nfrom xmind2testcasezen.services import get_testcase_list\r\nfrom xmind2testcasezen.services import get_testsuite_list\r\n\r\n\r\ndef main():\r\n    xmind_file = 'docs/xmind_testcase_template.xmind'\r\n    print('Start to convert XMind file: %s' % xmind_file)\r\n\r\n    zentao_csv_file = xmind_to_zentao_csv_file(xmind_file)\r\n    print('Convert XMind file to zentao csv file successfully: %s' % zentao_csv_file)\r\n\r\n    testlink_xml_file = xmind_to_testlink_xml_file(xmind_file)\r\n    print('Convert XMind file to testlink xml file successfully: %s' % testlink_xml_file)\r\n\r\n    testsuite_json_file = gen_testsuite_to_json_file(xmind_file)\r\n    print('Convert XMind file to testsuite json file successfully: %s' % testsuite_json_file)\r\n\r\n    testcase_json_file = gen_testcase_to_json_file(xmind_file)\r\n    print('Convert XMind file to testcase json file successfully: %s' % testcase_json_file)\r\n\r\n    testsuites = get_testsuite_list(xmind_file)\r\n    print('Convert XMind to testsuits dict data:\\n%s' % json.dumps(testsuites, indent=2, separators=(',', ': '), ensure_ascii=False))\r\n\r\n    testcases = get_testcase_list(xmind_file)\r\n    print('Convert Xmind to testcases dict data:\\n%s' % json.dumps(testcases, indent=4, separators=(',', ': ')))\r\n\r\n    workbook = xmind.load(xmind_file)\r\n    print('Convert XMind to Json data:\\n%s' % json.dumps(workbook.getData(), indent=2, separators=(',', ': '), ensure_ascii=False))\r\n\r\n    print('Finished conversion, Congratulations!')\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n```\r\n\r\n#### [4\u3001XMind\u7528\u4f8b\u6587\u4ef6\u8f6c\u4e3aJSON\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/tree/master#4xmind%E7%94%A8%E4%BE%8B%E6%96%87%E4%BB%B6%E8%BD%AC%E4%B8%BAjson%E6%95%B0%E6%8D%AE)\r\n\r\n[![xmind_testcase_demo](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/xmind_testcase_demo.png)\r\n\r\n##### [\uff081\uff09\u8f6c\u4e3aTestCase JSON\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/tree/master#1%E8%BD%AC%E4%B8%BAtestcase-json%E6%95%B0%E6%8D%AE)\r\n\r\n```\r\nfrom xmind2testcasezen.services import get_testcase_list\r\nxmind_file = 'docs/xmind_testcase_demo.xmind'\r\ntestcases = get_testcase_list(xmind_file)\r\nprint(testcases)\r\n\r\n\r\nOutput:\r\n\r\n[\r\n    {                                                # \u6d4b\u8bd5\u7528\u4f8b\r\n        \"name\": \"\u6d4b\u8bd5\u7528\u4f8b1\",                           # \u7528\u4f8b\u6807\u9898\r\n        \"version\": 1,                                 # \u7528\u4f8b\u7248\u672c\r\n        \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b1\",                        # \u7528\u4f8b\u6458\u8981\r\n        \"preconditions\": \"\u524d\u7f6e\u6761\u4ef6\",                   # \u524d\u7f6e\u6761\u4ef6\r\n        \"execution_type\": 1,                          # \u7528\u4f8b\u6267\u884c\u7c7b\u578b\uff081\uff1a\u624b\u52a8\u30012\uff1a\u81ea\u52a8\uff09\r\n        \"importance\": 1,                              # \u4f18\u5148\u7ea7\uff081\uff1a\u9ad8\u30012\uff1a\u4e2d\u30013\uff1a\u4f4e\uff09\r\n        \"estimated_exec_duration\": 3,                 # \u9884\u8ba1\u6267\u884c\u65f6\u95f4\uff08\u5206\u949f\uff09\r\n        \"status\": 7,                                  # \u7528\u4f8b\u72b6\u6001\uff081\uff1a\u8349\u7a3f\u30012\uff1a\u5f85\u8bc4\u5ba1\u30013\uff1a\u8bc4\u5ba1\u4e2d\u30014\uff1a\u91cd\u505a\u30015\u3001\u5e9f\u5f03\u30016\uff1afeature\u30017\uff1a\u7ec8\u7a3f\uff09\r\n        \"steps\": [                                    # \u6d4b\u8bd5\u6b65\u9aa4\u5217\u8868\r\n            {\r\n                \"step_number\": 1,                     # \u7f16\u53f7\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\",                 # \u6b65\u9aa4\u5185\u5bb9\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\",         # \u9884\u671f\u7ed3\u679c\r\n                \"execution_type\": 1                    # \u6267\u884c\u7c7b\u578b\uff081\uff1a\u624b\u52a8\uff0c2\uff1a\u81ea\u52a8\uff09\r\n            }, \r\n            {\r\n                \"step_number\": 2, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa42\", \r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c2\", \r\n                \"execution_type\": 1\r\n            }\r\n        ], \r\n        \"product\": \"\u6211\u662f\u4ea7\u54c1\u540d\",                          # \u4ea7\u54c1\u540d\u79f0\r\n        \"suite\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c61)\"                     # \u6d4b\u8bd5\u96c6\uff08\u6a21\u5757\u540d\uff09\r\n    }, \r\n    {\r\n        \"name\": \"\u6d4b\u8bd5\u7528\u4f8b2\", \r\n        \"version\": 1, \r\n        \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b2\", \r\n        \"preconditions\": \"\u524d\u7f6e\u6761\u4ef6\", \r\n        \"execution_type\": 1, \r\n        \"importance\": 1, \r\n        \"estimated_exec_duration\": 3, \r\n        \"status\": 7, \r\n        \"steps\": [\r\n            {\r\n                \"step_number\": 1, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\", \r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\", \r\n                \"execution_type\": 1\r\n            }, \r\n            {\r\n                \"step_number\": 2, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u9884\u671f\u7ed3\u679c2\u53ef\u4ee5\u4e3a\u7a7a\uff09\", \r\n                \"expectedresults\": \"\", \r\n                \"execution_type\": 1\r\n            }, \r\n            {\r\n                \"step_number\": 3, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa43\", \r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c3\", \r\n                \"execution_type\": 1\r\n            }, \r\n            {\r\n                \"step_number\": 4, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa44\", \r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c4\", \r\n                \"execution_type\": 1\r\n            }\r\n        ], \r\n        \"product\": \"\u6211\u662f\u4ea7\u54c1\u540d\", \r\n        \"suite\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c61)\"\r\n    }, \r\n    {\r\n        \"name\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u6d4b\u8bd5\u6b65\u9aa4\u548c\u9884\u671f\u7ed3\u679c\u53ef\u4ee5\u90fd\u4e3a\u7a7a\uff09\", \r\n        \"version\": 1, \r\n        \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u6d4b\u8bd5\u6b65\u9aa4\u548c\u9884\u671f\u7ed3\u679c\u53ef\u4ee5\u90fd\u4e3a\u7a7a\uff09\", \r\n        \"preconditions\": \"\u65e0\", \r\n        \"execution_type\": 1, \r\n        \"importance\": 2, \r\n        \"estimated_exec_duration\": 3, \r\n        \"status\": 7, \r\n        \"steps\": [ ], \r\n        \"product\": \"\u6211\u662f\u4ea7\u54c1\u540d\", \r\n        \"suite\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c61)\"\r\n    }, \r\n    {\r\n        \"name\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u4f18\u5148\u7ea7\u9ed8\u8ba4\u4e3a\u4e2d\uff09\", \r\n        \"version\": 1, \r\n        \"summary\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u4f18\u5148\u7ea7\u9ed8\u8ba4\u4e3a\u4e2d\uff09\", \r\n        \"preconditions\": \"\u65e0\", \r\n        \"execution_type\": 1, \r\n        \"importance\": 3, \r\n        \"estimated_exec_duration\": 3, \r\n        \"status\": 7, \r\n        \"steps\": [\r\n            {\r\n                \"step_number\": 1, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\", \r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\", \r\n                \"execution_type\": 1\r\n            }, \r\n            {\r\n                \"step_number\": 2, \r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa43\", \r\n                \"expectedresults\": \"\", \r\n                \"execution_type\": 1\r\n            }\r\n        ], \r\n        \"product\": \"\u6211\u662f\u4ea7\u54c1\u540d\", \r\n        \"suite\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c62)\"\r\n    }, \r\n    {\r\n        \"name\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u524d\u7f6e\u6761\u4ef6\u9ed8\u8ba4\u4e3a\u7a7a\uff09 \u65e0\u8bbe\u7f6e\u4f18\u5148\u7ea7\uff0c\u8fd9\u91cc\u52a0\u5165\u7528\u4f8b\u6807\u9898\", \r\n        \"version\": 1, \r\n        \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u524d\u7f6e\u6761\u4ef6\u9ed8\u8ba4\u4e3a\u7a7a\uff09 \u65e0\u8bbe\u7f6e\u4f18\u5148\u7ea7\uff0c\u8fd9\u91cc\u52a0\u5165\u7528\u4f8b\u6807\u9898\", \r\n        \"preconditions\": \"\u65e0\", \r\n        \"execution_type\": 1, \r\n        \"importance\": 2, \r\n        \"estimated_exec_duration\": 3, \r\n        \"status\": 7, \r\n        \"steps\": [ ], \r\n        \"product\": \"\u6211\u662f\u4ea7\u54c1\u540d\", \r\n        \"suite\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c62)\"\r\n    }\r\n]\r\n```\r\n\r\n\u6d4b\u8bd5\u7528\u4f8b\u6570\u636e\u589e\u52a0\u6267\u884c\u7ed3\u679c\u5b57\u6bb5\uff1aresult\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a\r\n\r\n[![\u6d4b\u8bd5\u7528\u4f8b\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/raw/master/webtool/static/guide/testcase_json_demo.png)](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/testcase_json_demo.png)\r\n\r\n\u8be6\u60c5\u67e5\u770b[\u4f7f\u7528\u6307\u5357](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/index.md)\uff0c\u53c2\u8003\u793a\u4f8b\uff1a[testcase json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_to_testcase_json.json)\r\n\r\n##### [\uff082\uff09\u8f6c\u4e3aTestSuite JSON\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/tree/master#2%E8%BD%AC%E4%B8%BAtestsuite-json%E6%95%B0%E6%8D%AE)\r\n\r\n```\r\nfrom xmind2testcasezen.services import get_testsuite_list\r\nxmind_file = 'docs/xmind_testcase_demo.xmind'\r\ntestsuites = get_testsuite_list(xmind_file)\r\nprint(testsuites)\r\n\r\n\r\nOutput:\r\n\r\n[\r\n  {                                                 # XMind\u753b\u5e03\uff08Sheet)\u5217\u8868\r\n    \"name\": \"\u6211\u662f\u4ea7\u54c1\u540d\",                             # \u4ea7\u54c1\u540d\u79f0\r\n    \"details\": null,                                 # \u4ea7\u54c1\u6458\u8981\r\n    \"testcase_list\": [],                             # \u7528\u4f8b\u5217\u8868\r\n    \"sub_suites\": [                                  # \u7528\u4f8b\u96c6\u5217\u8868\r\n      {\r\n        \"name\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c61)\",                  # \u7528\u4f8b\u96c61\u540d\u79f0\uff08\u6a21\u5757\u540d\uff09\r\n        \"details\": null,                             # \u7528\u4f8b\u96c6\u6458\u8981\r\n        \"testcase_list\": [                           # \u7528\u4f8b\u5217\u8868\r\n          {                                          # \u5177\u4f53\u7528\u4f8b\r\n            \"name\": \"\u6d4b\u8bd5\u7528\u4f8b1\",\r\n            \"version\": 1,\r\n            \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b1\",\r\n            \"preconditions\": \"\u524d\u7f6e\u6761\u4ef6\",\r\n            \"execution_type\": 1,\r\n            \"importance\": 1,\r\n            \"estimated_exec_duration\": 3,\r\n            \"status\": 7,\r\n            \"steps\": [\r\n              {\r\n                \"step_number\": 1,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\",\r\n                \"execution_type\": 1\r\n              },\r\n              {\r\n                \"step_number\": 2,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa42\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c2\",\r\n                \"execution_type\": 1\r\n              }\r\n            ]\r\n          },\r\n          {\r\n            \"name\": \"\u6d4b\u8bd5\u7528\u4f8b2\",\r\n            \"version\": 1,\r\n            \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b2\",\r\n            \"preconditions\": \"\u524d\u7f6e\u6761\u4ef6\",\r\n            \"execution_type\": 1,\r\n            \"importance\": 1,\r\n            \"estimated_exec_duration\": 3,\r\n            \"status\": 7,\r\n            \"steps\": [\r\n              {\r\n                \"step_number\": 1,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\",\r\n                \"execution_type\": 1\r\n              },\r\n              {\r\n                \"step_number\": 2,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u9884\u671f\u7ed3\u679c2\u53ef\u4ee5\u4e3a\u7a7a\uff09\",\r\n                \"expectedresults\": \"\",\r\n                \"execution_type\": 1\r\n              },\r\n              {\r\n                \"step_number\": 3,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa43\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c3\",\r\n                \"execution_type\": 1\r\n              },\r\n              {\r\n                \"step_number\": 4,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa44\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c4\",\r\n                \"execution_type\": 1\r\n              }\r\n            ]\r\n          },\r\n          {\r\n            \"name\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u6d4b\u8bd5\u6b65\u9aa4\u548c\u9884\u671f\u7ed3\u679c\u53ef\u4ee5\u90fd\u4e3a\u7a7a\uff09\",\r\n            \"version\": 1,\r\n            \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u6d4b\u8bd5\u6b65\u9aa4\u548c\u9884\u671f\u7ed3\u679c\u53ef\u4ee5\u90fd\u4e3a\u7a7a\uff09\",\r\n            \"preconditions\": \"\u65e0\",\r\n            \"execution_type\": 1,\r\n            \"importance\": 2,\r\n            \"estimated_exec_duration\": 3,\r\n            \"status\": 7,\r\n            \"steps\": []\r\n          }\r\n        ],\r\n        \"sub_suites\": []                            # \u7528\u4f8b\u96c6\u4e2d\u53ef\u4ee5\u5305\u542b\u5b50\u7528\u4f8b\u96c6\uff08\u76ee\u524d\u53ea\u8981\u4ea7\u54c1\u7c7b\u522b\u4e0b\u6709\u7528\u4f8b\u96c6\uff09\r\n      },\r\n      {\r\n        \"name\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c62)\",                  # \u7528\u4f8b\u96c62\u540d\u79f0\uff08\u6a21\u5757\u540d\uff09\r\n        \"details\": \"\u6d4b\u8bd5\u96c6\u6458\u8981\uff08\u8be6\u60c5\uff09\",\r\n        \"testcase_list\": [\r\n          {\r\n            \"name\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u4f18\u5148\u7ea7\u9ed8\u8ba4\u4e3a\u4e2d\uff09\",\r\n            \"version\": 1,\r\n            \"summary\": \"\u6d4b\u8bd5\u6b65\u9aa42\uff08\u4f18\u5148\u7ea7\u9ed8\u8ba4\u4e3a\u4e2d\uff09\",\r\n            \"preconditions\": \"\u65e0\",\r\n            \"execution_type\": 1,\r\n            \"importance\": 3,\r\n            \"estimated_exec_duration\": 3,\r\n            \"status\": 7,\r\n            \"steps\": [\r\n              {\r\n                \"step_number\": 1,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa41\",\r\n                \"expectedresults\": \"\u9884\u671f\u7ed3\u679c1\",\r\n                \"execution_type\": 1\r\n              },\r\n              {\r\n                \"step_number\": 2,\r\n                \"actions\": \"\u6d4b\u8bd5\u6b65\u9aa43\",\r\n                \"expectedresults\": \"\",\r\n                \"execution_type\": 1\r\n              }\r\n            ]\r\n          },\r\n          {\r\n            \"name\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u524d\u7f6e\u6761\u4ef6\u9ed8\u8ba4\u4e3a\u7a7a\uff09 \u65e0\u8bbe\u7f6e\u4f18\u5148\u7ea7\uff0c\u8fd9\u91cc\u52a0\u5165\u7528\u4f8b\u6807\u9898\",\r\n            \"version\": 1,\r\n            \"summary\": \"\u6d4b\u8bd5\u7528\u4f8b3\uff08\u524d\u7f6e\u6761\u4ef6\u9ed8\u8ba4\u4e3a\u7a7a\uff09 \u65e0\u8bbe\u7f6e\u4f18\u5148\u7ea7\uff0c\u8fd9\u91cc\u52a0\u5165\u7528\u4f8b\u6807\u9898\",\r\n            \"preconditions\": \"\u65e0\",\r\n            \"execution_type\": 1,\r\n            \"importance\": 2,\r\n            \"estimated_exec_duration\": 3,\r\n            \"status\": 7,\r\n            \"steps\": []\r\n          }\r\n        ],\r\n        \"sub_suites\": []\r\n      }\r\n    ]\r\n  }\r\n]\r\n```\r\n\r\nTestSuite\u589e\u52a0\u6267\u884c\u7ed3\u679c\u7edf\u8ba1\u5b57\u6bb5\uff1astatistics\uff0c\u793a\u4f8b\u5982\u4e0b\uff1a\r\n\r\n[![\u6d4b\u8bd5\u7528\u4f8b\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/raw/master/webtool/static/guide/testsuite_json_demo.png)](https://github.com/maiyajj/xmind2testcasezen/blob/master/webtool/static/guide/testsuite_json_demo.png)\r\n\r\n\u53c2\u8003\u793a\u4f8b\uff1a[testsuite json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_to_testsuite_json.json)\r\n\r\n##### [\uff083\uff09XMind\u6587\u4ef6\u8f6c\u6362\u4e3aJSON\u6570\u636e](https://github.com/maiyajj/xmind2testcasezen/tree/master#3xmind%E6%96%87%E4%BB%B6%E8%BD%AC%E6%8D%A2%E4%B8%BAjson%E6%95%B0%E6%8D%AE)\r\n\r\n\u4ee5\u4e0a\uff081\uff09TestCase\u6570\u636e\u3001\uff082\uff09TestSuite\u6570\u636e\u7684\u83b7\u53d6\uff0c\u5176\u5b9e\u662f\u57fa\u4e8e\\*\\*[XMind](https://github.com/zhuifengshen/xmind)\\*\\*\u8fd9\u4e2a\u5de5\u5177\uff0c\u5bf9XMind\u6587\u4ef6\u8fdb\u884c\u89e3\u6790\u548c\u6570\u636e\u63d0\u53d6\uff0c\u7136\u540e\u8f6c\u6362\u800c\u6765\u3002 \u8fd9\u4e2a\u5de5\u5177\u662f\u5728\u8bbe\u8ba1XMind2TestCaseZen\u65f6\uff0c\u9488\u5bf9XMind\u5355\u72ec\u62bd\u53d6\u51fa\u6765\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86XMind\u601d\u7ef4\u5bfc\u56fe\u521b\u5efa\u3001\u89e3\u6790\u3001\u66f4\u65b0\u7684\u4e00\u7cfb\u5217\u65b9\u6cd5\u3002\u4f7f\u7528\u5b83\u53ef\u4ee5\u76f4\u63a5\u5c06XMind\u6587\u4ef6\u8f6c\u6362\u4e3aJSON\u6570\u636e\uff1a\r\n\r\n```\r\nimport xmind\r\nxmind_file = 'docs/xmind_testcase_demo.xmind'\r\nworkbook = xmind.load(xmind_file)\r\ndata = workbook.getData()\r\nprint(data)\r\n\r\n\r\nOutput:\r\n\r\n[\r\n  {                                                    # XMind\u753b\u5e03(sheet)\u5217\u8868\r\n    \"id\": \"7hmnj6ahp0lonp4k2hodfok24f\",                # \u753b\u5e03ID\r\n    \"title\": \"\u753b\u5e03 1\",                                  # \u753b\u5e03\u540d\u79f0\r\n    \"topic\": {                                         # \u4e2d\u5fc3\u4e3b\u9898\r\n      \"id\": \"7c8av5gt8qfbac641lth4g1p67\",              # \u4e3b\u9898ID\r\n      \"link\": null,                                    # \u4e3b\u9898\u4e0a\u7684\u8d85\u94fe\u63a5\u4fe1\u606f\r\n      \"title\": \"\u6211\u662f\u4ea7\u54c1\u540d\",                             # \u4e3b\u9898\u540d\u79f0\r\n      \"note\": null,                                    # \u4e3b\u9898\u4e0a\u7684\u5907\u6ce8\u4fe1\u606f\r\n      \"label\": null,                                   # \u4e3b\u9898\u4e0a\u6807\u7b7e\u4fe1\u606f\r\n      \"comment\": null,                                 # \u4e3b\u9898\u4e0a\u7684\u6279\u6ce8\uff08\u8bc4\u8bba\uff09\u4fe1\u606f\r\n      \"markers\": [],                                   # \u4e3b\u9898\u4e0a\u7684\u56fe\u6807\u4fe1\u606f\r\n      \"topics\": [                                      # \u5b50\u4e3b\u9898\u5217\u8868\r\n        {\r\n          \"id\": \"2rj4ek3nn4sk0lc4pje3gvgv9k\",\r\n          \"link\": null,\r\n          \"title\": \"\u6211\u662f\u6a21\u5757\u540d(\u6d4b\u8bd5\u96c61)\",                  # \u5b50\u4e3b\u98981\r\n          \"note\": null,\r\n          \"label\": null,\r\n          \"comment\": null,\r\n          \"markers\": [],\r\n          \"topics\": [                                    # \u5b50\u4e3b\u9898\u4e0b\u7684\u5b50\u4e3b\u9898\u5217\u8868\r\n            {\r\n              \"id\": \"3hjj43s7rv66uncr1srl3qsboi\",\r\n              \"link\": null,\r\n              \"title\": \"\u6d4b\u8bd5\u7528\u4f8b1\",\r\n              \"note\": \"\u524d\u7f6e\u6761\u4ef6\\n\",\r\n              \"label\": \"\u624b\u52a8\uff08\u6267\u884c\u65b9\u5f0f\u9ed8\u8ba4\u4e3a\u624b\u52a8\uff09\",\r\n              \"comment\": null,\r\n              \"markers\": [\r\n                \"priority-1\"\r\n              ],\r\n              \"topics\": [\r\n                {\r\n                  \"id\": \"3djn37j1fdc6081de319slf035\",\r\n                  \"link\": null,\r\n                  \"title\": \"\u6d4b\u8bd5\u6b65\u9aa41\",\r\n                  \"note\": null,\r\n                  \"label\": null,\r\n                  \"comment\": null,\r\n                  \"markers\": [],\r\n                  \"topics\": [\r\n                    {\r\n                      \"id\": \"7v0f1152popou38ndaaamt49l5\",\r\n                      \"link\": null,\r\n                      \"title\": \"\u9884\u671f\u7ed3\u679c1\",\r\n                      \"note\": null,\r\n                      \"label\": null,\r\n                      \"comment\": null,\r\n                      \"markers\": []\r\n                    }\r\n                  ]\r\n                },\r\n                {\r\n                  \"id\": \"2srtqqjp818clkk1drm233lank\",\r\n                  \"link\": null,\r\n                  \"title\": \"\u6d4b\u8bd5\u6b65\u9aa42\",\r\n                  \"note\": null,\r\n                  \"label\": null,\r\n                  \"comment\": null,\r\n                  \"markers\": [],\r\n                  \"topics\": [\r\n                    {\r\n                      \"id\": \"4jlbo280urmid3qkd01j7h8jnq\",\r\n                      \"link\": null,\r\n                      \"title\": \"\u9884\u671f\u7ed3\u679c2\",\r\n                      \"note\": null,\r\n                      \"label\": null,\r\n                      \"comment\": null,\r\n                      \"markers\": []\r\n                    }\r\n                  ]\r\n                }\r\n              ]\r\n            },\r\n            ...\r\n          ]\r\n        },\r\n        ...\r\n      ]\r\n    }\r\n  }\r\n]\r\n```\r\n\r\n\u5177\u4f53\u53c2\u8003\uff1a[xmind\\_testcase\\_demo.json](https://github.com/maiyajj/xmind2testcasezen/blob/master/docs/xmind_testcase_demo.json)\r\n\r\n### \u4e5d\u3001\u81ea\u52a8\u5316\u53d1\u5e03\uff1a\u4e00\u952e\u6253 Tag \u5e76\u4e0a\u4f20\u81f3 PYPI\r\n\r\n\u6bcf\u6b21\u5728 \\_\\_ about \\_\\_.py \u66f4\u65b0\u7248\u672c\u53f7\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5b9e\u73b0\u81ea\u52a8\u5316\u66f4\u65b0\u6253\u5305\u4e0a\u4f20\u81f3 [PYPI](https://pypi.org/) \uff0c\u540c\u65f6\u6839\u636e\u5176\u7248\u672c\u53f7\u81ea\u52a8\u6253 Tag \u5e76\u63a8\u9001\u5230\u4ed3\u5e93\uff1a\r\n\r\n[![upload_pypi](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/pypi_upload.png)](https://raw.githubusercontent.com/maiyajj/xmind2testcasezen/master/webtool/static/guide/pypi_upload.png)\r\n\r\n### \u5341\u3001CHANGELOG\r\n\r\n```\r\nv1.0.0\r\n1\u3001XMind\u7528\u4f8b\u6a21\u677f\u5b9a\u4e49\u548c\u89e3\u6790\uff1b\r\n2\u3001XMind\u7528\u4f8b\u8f6c\u6362\u4e3aTestLink\u7528\u4f8b\u6587\u4ef6\uff1b\r\n\r\nv1.1.0\r\n1\u3001XMind\u7528\u4f8b\u6587\u4ef6\u8f6c\u6362\u4e3a\u7985\u9053\u7528\u4f8b\u6587\u4ef6\uff1b\r\n2\u3001\u6dfb\u52a0\u4e00\u952e\u4e0a\u4f20PYPI\u529f\u80fd\uff1b\r\n\r\nv1.2.0\r\n1\u3001\u6dfb\u52a0Web\u5de5\u5177\u8fdb\u884c\u7528\u4f8b\u8f6c\u6362\uff1b\r\n2\u3001\u6dfb\u52a0\u7528\u6237\u4f7f\u7528\u6307\u5357\uff1b\r\n\r\nv1.3.0\r\n1\u3001XMind\u4e2d\u652f\u6301\u6807\u8bc6\u6d4b\u8bd5\u7528\u4f8b\u6267\u884c\u7ed3\u679c\uff1b\r\n2\u3001TestCase\u3001TestSuite\u4e2d\u6dfb\u52a0\u7528\u4f8b\u6267\u884c\u7ed3\u679c\u7edf\u8ba1\u6570\u636e\uff1b\r\n3\u3001\u5b8c\u5584\u7528\u6237\u4f7f\u7528\u6307\u5357\uff1b\r\n\r\nv1.5.0\r\n1\u3001\u652f\u6301\u901a\u8fc7\u6807\u7b7e\u8bbe\u7f6e\u7528\u4f8b\u7c7b\u578b\uff08\u81ea\u52a8 or \u624b\u52a8\uff09\uff1b\r\n2\u3001\u652f\u6301\u5bfc\u51fa\u6587\u4ef6\u4e2d\u6587\u663e\u793a\uff1b\r\n3\u3001\u589e\u52a0\u547d\u4ee4\u8fd0\u884c\u6307\u5f15\uff1b\r\n4\u3001\u4fee\u590d\u670d\u52a1\u5668\u8fdc\u7a0b\u90e8\u7f72\u65e0\u6cd5\u8bbf\u95ee\u95ee\u9898\uff1b\r\n5\u3001\u53d6\u6d88\u6d4b\u8bd5\u7528\u4f8b\u5173\u952e\u5b57\u9ed8\u8ba4\u8bbe\u7f6e\uff1b\r\n\r\nv1.6.0\r\n1\u3001\u652f\u6301Xmind Zen\u7248\u672c\r\n2\u3001\u652f\u6301\u7528\u4f8b\u64cd\u4f5c\u6b65\u9aa4\u591a\u4e2a\u9884\u671f\u7ed3\u679c\r\n\r\n\u5907\u6ce8\uff1aXMind2TestcaseZen\u9488\u5bf9XMind\u7ecf\u5178\u7cfb\u5217\u7248\u672c\uff0c\u540c\u65f6\u4e5f\u652f\u6301XMind Zen\u7248\u672c\uff01\r\n```\r\n\r\n### \u5341\u4e00\u3001\u81f4\u8c22\r\n\r\n**XMind2TestCaseZen** \u5de5\u5177\u7684\u4ea7\u751f\uff0c\u53d7\u76ca\u4e8e\u4ee5\u4e0b\u56db\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u5e76\u5728\u6b64\u57fa\u7840\u4e0a\u6269\u5c55\u3001\u4f18\u5316\uff0c\u53d7\u76ca\u532a\u6d45\uff0c\u611f\u6069\uff01\r\n\r\n-   1\u3001**[XMind](https://github.com/zhuifengshen/xmind)**\uff1aXMind\u601d\u7ef4\u5bfc\u56fe\u521b\u5efa\u3001\u89e3\u6790\u3001\u66f4\u65b0\u7684\u4e00\u7ad9\u5f0f\u89e3\u51b3\u65b9\u6848(Python\u5b9e\u73b0)\uff01\r\n-   2\u3001**[xmind2testlink](https://github.com/tobyqin/xmind2testlink)**\uff1a\u8df5\u884c\u4e86XMind\u901a\u7528\u6d4b\u8bd5\u7528\u4f8b\u6a21\u677f\u8bbe\u8ba1\u601d\u8def\uff0c\u540c\u65f6\u63d0\u4f9b\u4e86Web\u8f6c\u6362\u5de5\u5177\uff01\r\n-   3\u3001**[TestLink](http://www.testlink.org/)**\uff1a\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406\u6d41\u7a0b\u548c\u6587\u6863\uff1b\r\n-   4\u3001**[\u7985\u9053\u5f00\u6e90\u7248(ZenTao)](https://www.zentao.net/)**\uff1a\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u9879\u76ee\u7ba1\u7406\u6d41\u7a0b\u3001\u6587\u6863\u548c\u7528\u6237\u4ea4\u6d41\u91ca\u7591\u7fa4\uff1b\r\n\r\n\u5f97\u76ca\u4e8e\u5f00\u6e90\uff0c\u4e5f\u5c06\u575a\u6301\u5f00\u6e90\uff0c\u5e76\u4e3a\u52aa\u529b\u5f00\u6e90\u8d21\u732e\u81ea\u5df1\u7684\u70b9\u6ef4\u4e4b\u529b\u3002\u540e\u7eed\uff0c\u5c06\u7ee7\u7eed\u6839\u636e\u5b9e\u9645\u9879\u76ee\u9700\u8981\uff0c\u5b9a\u671f\u8fdb\u884c\u66f4\u65b0\u7ef4\u62a4\r\n\r\n[![QA\u4e4b\u7985](https://camo.githubusercontent.com/bc2aac4b8cddac2cbbd449a37a351d17c4616204172180b865b8be3b4c4b67bc/687474703a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f3133393538312d323763363033306261373230383436662e6a70673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430)](https://camo.githubusercontent.com/bc2aac4b8cddac2cbbd449a37a351d17c4616204172180b865b8be3b4c4b67bc/687474703a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f3133393538312d323763363033306261373230383436662e6a70673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430)\r\n\r\n### [LICENSE](https://github.com/maiyajj/xmind2testcasezen/tree/master#license)\r\n\r\n```\r\nMIT License\r\n\r\nCopyright (c) 2019 Devin https://zhangchuzhao.site\r\nCopyright (c) 2017 Toby Qin\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "XMind2TestCaseZen\u57fa\u4e8eXMind2TestCase\u505a\u4e8c\u6b21\u5f00\u53d1\uff0c\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9ad8\u6548\u6d4b\u8bd5\u7528\u4f8b\u8bbe\u8ba1\u7684\u89e3\u51b3\u65b9\u6848\uff01",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/maiyajj/xmind2testcasezen"
    },
    "split_keywords": [
        "xmind2testcase",
        " testcase",
        " test",
        " testing",
        " xmind",
        " \u601d\u7ef4\u5bfc\u56fe",
        " xmind\u601d\u7ef4\u5bfc\u56fe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b87a4d6a3ea3acf3eb2121d31a010cda3e5d6f65793f615ad235515ed2c661db",
                "md5": "4d1c953179461344bf6e4055470617a7",
                "sha256": "8901e42b4aa2854f8087deb3f1b3b2dab63cefbf72bba7000d3cb2a4e895fe79"
            },
            "downloads": -1,
            "filename": "xmind2testcasezen-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d1c953179461344bf6e4055470617a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0, <4",
            "size": 30540,
            "upload_time": "2023-10-17T10:06:36",
            "upload_time_iso_8601": "2023-10-17T10:06:36.391127Z",
            "url": "https://files.pythonhosted.org/packages/b8/7a/4d6a3ea3acf3eb2121d31a010cda3e5d6f65793f615ad235515ed2c661db/xmind2testcasezen-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ec9d0c6a133b4713908b5e55f75f0aadc9bc4b32166d9f9f548df537080a812",
                "md5": "9960a79a015869705af5e6177637b21f",
                "sha256": "01300a548d47999b807d90fa92536666fadd298dc56b3d5ca7d1a6d6fae3159b"
            },
            "downloads": -1,
            "filename": "xmind2testcasezen-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "9960a79a015869705af5e6177637b21f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0, <4",
            "size": 36968,
            "upload_time": "2023-10-17T10:06:38",
            "upload_time_iso_8601": "2023-10-17T10:06:38.566565Z",
            "url": "https://files.pythonhosted.org/packages/7e/c9/d0c6a133b4713908b5e55f75f0aadc9bc4b32166d9f9f548df537080a812/xmind2testcasezen-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-17 10:06:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maiyajj",
    "github_project": "xmind2testcasezen",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xmind2testcasezen"
}
        
Elapsed time: 0.15849s