xml 将测试用例导入到 Testlink

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23144475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 12:02:02  来源:igfitidea点击:

Import test cases to Testlink

xmlexcelimporttestlink

提问by user127947

I'm trying to import test cases to Testlink. The xml file is from excel. The fields I have are:

我正在尝试将测试用例导入到 Testlink。xml文件来自excel。我拥有的字段是:

Name,
Summary, 
Stepactions, 
Expectedresults

However, I only see Name and Summary in Testlink. Stepactions and expectedresults are not imported. What's wrong??

但是,我只在 Testlink 中看到 Name 和 Summary。不会导入 Stepactions 和 expectedresults。怎么了??

Thanks a lot!

非常感谢!

回答by D-D-Doug

Not sure what your xml looks like, but this works for me. I'm using Testlink version 1.9.7

不确定您的 xml 是什么样的,但这对我有用。我正在使用 Testlink 版本 1.9.7

<?xml version="1.0" encoding="UTF-8"?>
<testcases>
<testcase name="NAME_OF_TESTCASE">
    <summary>Description of test case</summary>
    <preconditions>some pre conditions</preconditions>
    <execution_type>2</execution_type>
    <steps>
        <step>
            <step_number>1</step_number>
            <actions>Do a thing</actions>
            <expectedresults>This is what to expect</expectedresults>
            <execution_type>2</execution_type>
        </step>
        <step>
            <step_number>2</step_number>
            <actions>Do another thing</actions>
            <expectedresults>more expected results</expectedresults>
            <execution_type>1</execution_type>
        </step>
    </steps>
    <custom_fields>
        <custom_field>
            <name>some_cf_name</name>
            <value>some_cf_value</value>
        </custom_field>
    </custom_fields>
</testcase>

回答by parthiban

Have a look at https://github.com/MrBricodage/TestLink--ImportExcelMacro

看看https://github.com/MrBricodage/TestLink--ImportExcelMacro

  • It has pdf documents which describes how to use it.
  • 它有描述如何使用它的 pdf 文档。

回答by WEshruth

It took three days to find this solution only u have to do is,

花了三天时间才找到这个解决方案,只有你需要做的是,

  • Download Ex-Converter from hereWorks fine only with Windows-7.
  • Create TestCases.xlsxexcel file with fields Name, Importance, Summary, Preconditions, Actions, Expected-results
  • Open downloaded application Ex-Converter.exe
  • Give path of TestCases.xlsxfile and new file TestCases.xml
  • Click on Convert
  • On TestLink > Test specification> Your Project name> Create test suite> inside test suite Import> TestCases.xml
  • You are DONE :)
  • 此处下载 Ex-Converter仅适用于 Windows-7。
  • TestCases.xlsx用字段创建excel文件Name, Importance, Summary, Preconditions, Actions, Expected-results
  • 打开下载的应用程序 Ex-Converter.exe
  • 给出TestCases.xlsx文件和新文件的路径TestCases.xml
  • 点击 Convert
  • 在 TestLink > Test specification> Your Project name> Create test suite> 内部测试套件Import>TestCases.xml
  • 你完成了:)