Import test cases to Testlink

user127947 picture user127947 · Apr 18, 2014 · Viewed 22.1k times · Source

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

Name,
Summary, 
Stepactions, 
Expectedresults

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

Thanks a lot!

Answer

D-D-Doug picture D-D-Doug · May 5, 2014

Not sure what your xml looks like, but this works for me. I'm using Testlink version 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>