Skip to content

RainYang0925/xmind2testlink

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xmind2testlink

PyPI Code Climate

With this tool, you will be able to convert xmind tests to testlink tests xml files. You should have python installed before running it.

Requirement: python 2.7 or 3.x

Installation and quick start

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

To build your tools with this package, do it like this:

from xmind2testlink.xmind_parser import *
from xmind2testlink.testlink_parser import *

# do your stuff

Design test cases via xmind

Xmind is an excellent mindmap tool, which can help you design test cases easily. To create a convertible xmind, please design your test cases like this:

test_case_by_xmind

Guidelines & Rules:

  1. Notes for a test suite will be converted to details in TestLink.
  2. Notes for a test case will be converted to summary in TestLink.
  3. Comments for a test case will be converted to preconditions in TestLink.
  4. Priority maker for a test case will be converted to importance in TestLink.
  5. 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.
  6. Use ! to ignore any test suite / test case / test step that you don't want to convert.
  7. The root topic will not be converted, just treat it as target suite node in TestLink.
  8. Free topic and notes will not be converted.
  9. Only the mindmap in first sheet will be converted.

Download the sample xmind file: test_case_by_xmind

Generate the TestLink xml file

Once your xmind had been created, use bellow command to convert it to TestLink recognized xml file.

xmind2testlink /path/to/testcase.xmind

An xml with same name will be generated in your xmind directory.

Import the xml into TestLink

Go to your TestLink website, import the xml into your target test suite step by step.

testlink_import_1

To avoid duplicates, you might want to Update date on Latest version.

testlink_import_2

Once you click on the Upload file button, all the tests will be imported as they listed in xmind.

testlink_import_3

The field mapping looks like below figure.

testlink_import_4

Advanced usage

1. Use it from browser

A simple webpage to host this feature also has been built in web folder. To starting 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:5000/ (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:5000. I am not good at web design, but I am trying my best to provide a friendly interface :-)

xmind2testlink_web

If you wan to deploy this application to a web server, please checkout Flask Deployment.

2. Batch convert on Windows

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!

About

convert xmind to test link xml files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 49.5%
  • CSS 29.5%
  • HTML 20.5%
  • Batchfile 0.5%