python脚本:把excel转为testlink的xml文件
python脚本:把excel转为testlink的xml文件
python脚本:把excel转为testlink的xml文件
简介
testlink只支持xml格式的导入,但是现在我们有一些用例以excel的形式展现。test_link.py:把excel转为testlink的xml文件,这样excel的文件也可以导入到testlink。
对excel文件的要求: 四列: 1, 测试用例名;2,测试预置条件;3,测试步骤;4,测试预期结果。第一行作为标题,不会被导入。
帮助
# ./test_link.py -h usage: test_link.py [-h] [-o OUTPUT] [--version] input ----------------------------------------------------------------------- -*-test_link-*- *********************************************************************** Function: Convert excel files to xml files which testlink know. Usage: use './test_link.py -h' to see help Example: ./test_link.py test_link.xls positional arguments: input Input file name optional arguments: -h, --help show this help message and exit -o OUTPUT output file name, default is output.xml --version show program's version number and exit
输出文件示例
"ismp is ok" "login web by selenium" "login ok" "ismp is ok" "订购一个电视机" "订购成功" "ISMP就绪" "关闭浏览器" "退出成功"
源代码
参见 http://automationtesting.sinaapp.com/blog/python_code_testlink
评论关闭