中文说明:xmind2testlink - 快速设计测试案例并导入TestLink,如果你的xmind中包含中文或者unicode,请使用Python 3.4+,谢谢。
With this tool, you will be able to convert xmind tests to testlink tests xml files. You should have python installed before running it.
See also xmindparser
Requirement:
python 2.7 or 3.4 +
The most easy to install xmind2testlink is using pip command:
pip install xmind2testlink -U
Now you are ready to convert an xmind to TestLink xml:
xmind2testlink /path/to/testcase.xmind
Generated: testcase.xml
# output json is also supported
xmind2testlink /path/to/testcase.xmind -json
Generated: testcase.json
To build your tools with this package, do it like this:
from xmind2testlink.xmind_parser import *
from xmind2testlink.testlink_parser import *
# do your stuff
Now xmind2testlink has been upgraded to v2, it supports 2 kinds of conversion.
For old users (xmind2testlink v1), your xmind looks like below structure.
The output:
Generally to say:
- The first sub topic => suite
- The sub topic of suite => test case title
- The sub topic of test case => test step
- The sub topic of test step => expected result
Your input xmind looks like this:
The output:
Rules:
- Mark root topic with a star marker, this means v2 xmind file. (no matter what color of star maker)
- First sub topic => it is still converted to suite
- Test case title will be combined by sub topics, until:
- Child topic is marked with priority
- Current topic is end topic
By default, the title parts are connected by blank space, you can define the connector
by last char of root topic, like this.
Then the output will be changed to:
Note: only valid chars can be used as a connector
.
Notes
for a test suite =>details
in TestLink.Notes
for a test case =>summary
in TestLink.Comments
for a test case =>preconditions
in TestLink.Priority
maker for a test case =>importance
in TestLink.- Sub topics for a test case will be treated as test steps.
- It is okay to design test step with action but without expected results.
- Use
!
to ignore any test suite / test case / test step that you don't want to convert. - Root topic will not be converted, just treat it as target suite node in TestLink.
- Free topic and notes will not be converted.
- Only the first sheet in xmind will be converted.
Download the sample xmind files:
Go to your TestLink website, import the xml into your target test suite step by step.
To avoid duplicates, you might want to Update date on Latest version.
Once you click on the Upload file button, all the tests will be imported as they listed in xmind.
The field mapping looks like below figure.
A simple webpage to host this feature also has been built in web
folder. To start the website, here is the command:
# clone this git repo ahead
cd /path/to/xmind2testlink/web
pip install -r requirements.txt -U
python application.py
* Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)
* Restarting with stat
Start a browser, then you will be able to convert xmind to TestLink via http://127.0.0.1:5001. I am not good at web design, but I am trying my best to provide a friendly interface :-)
If you wan to deploy this application to a web server, please checkout Flask Deployment.
It is okay to batch convert all xmind files in a folder, copy the xmind2testlink_all.bat
to your folder, then you will be able to convert all files by double clicking on it.
@echo off
@echo off
echo Batch xmind to testlink...
python -m pip install xmind2testlink -U >NUL
python -c "import glob, os;[os.system('xmind2testlink ""{}""'.format(f)) for f in glob.glob('*.xmind')]"
echo OK!