Tool for converting test cases from Excel sheet to XML file

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
jackzhang
TestLink user
Posts: 8
Joined: Wed Jan 30, 2013 7:03 pm

Tool for converting test cases from Excel sheet to XML file

Post by jackzhang »

Hi everyone. My current work need to use TestLink for SW testing management. And recently part of my task is to import our existing test specifications from Excel sheets to TestLink. After searching on the web, I didn't find an efficient way to do that, so just tried to write a tool with C# for the importing work. Well, I feel it's insteresting and may also helps with your work, too. So, just put it on SourceForge and share with you guys :-)
Here: http://sourceforge.net/projects/ex-converter/ (I'm calling it "EX-Converter", Odd?)

This tool parses your Excel sheets and generate test cases/test suites to XML file, then you can use that XML file for TestLink importing. It's quite easy to use, and I also created some sample template documents for you to understand how it works. In general, it supports:
- generating XML in TestLink's Test Cases format;
- generating XML in TestLink's Test Suite format, and supports up to 2 level depth of sub suite hierarchy.
- fully or partially convert test cases from Excel sheet;
- print out converting logs with possible warnings or errors that help to identify invalid formats.
- mapping fileds of Name/Importance/Summary/Preconditions/Actions/Expected Results with columns in your existing Excel sheet, no need to comply with a fixed column order.

To use this tool, you need to have Microsoft .Net Framework 4.0 and Excel application (2007 or upper, I guess) pre-installed in your system. If you are using Win7, then just need to have Excel installed. I've tested the tool with XP/Win7 and Excel 2007 only. So, once you found it's not work for you, just let me know.

If you have Visual Studio installed, just download the source code and compile with yourself. Source code here:
http://sourceforge.net/projects/ex-conv ... ce%20Code/

if you don't want to compile by yourself, just download the exe here:
http://sourceforge.net/projects/ex-conv ... lications/

Template files and descriptive files can be found here:
http://sourceforge.net/projects/ex-conv ... mentation/

Just hope it could help with you :-)

Also, a screenshot of the tool...
Image
68K
Advanced user
Posts: 22
Joined: Wed Sep 02, 2009 10:49 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by 68K »

Awesome, thank you! :)
This will save lots of time :)
tlLeung
TestLink user
Posts: 1
Joined: Tue Jun 18, 2013 6:47 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by tlLeung »

This tool is quite useful.
johnwcv
TestLink user
Posts: 7
Joined: Sat Apr 06, 2013 10:06 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by johnwcv »

Hi.
I am getting this error using it:
---------------------------
Sheet Mapping Error: input string was not in a correct format.
---------------------------

Any idea?
jackzhang
TestLink user
Posts: 8
Joined: Wed Jan 30, 2013 7:03 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by jackzhang »

Basically, it is because the field of "Active Sheet" in this tool accepts digits only. That digit should be corresponding to the position number of destination tab in your source Excel. Say, for the first tab, just enter "1" in that field, second as "2", and so on. No need to enter the name of the tab.

Also, a tutorial and templates are available for "Ex-Converter"; those explain more about how to use.
you can find them here: http://sourceforge.net/projects/ex-conv ... mentation/
johnwcv
TestLink user
Posts: 7
Joined: Sat Apr 06, 2013 10:06 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by johnwcv »

jackzhang wrote:Basically, it is because the field of "Active Sheet" in this tool accepts digits only. That digit should be corresponding to the position number of destination tab in your source Excel. Say, for the first tab, just enter "1" in that field, second as "2", and so on. No need to enter the name of the tab.

Also, a tutorial and templates are available for "Ex-Converter"; those explain more about how to use.
you can find them here: http://sourceforge.net/projects/ex-conv ... mentation/
Hi.
I understood it. Now, I am getting this error:

---------------------------
Error: No se pudo recuperar el generador de clases COM para el componente con CLSID {00024500-0000-0000-C000-000000000046} debido al siguiente error: 80040154 Clase no registrada (Excepción de HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
---------------------------

Any idea?
jackzhang
TestLink user
Posts: 8
Joined: Wed Jan 30, 2013 7:03 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by jackzhang »

Sorry, I don't read the language you've attached, but by simply Google it, this link may help you:
http://social.msdn.microsoft.com/Forums ... -con-clsid

In addition, please ensure you have:
- admin rights of your system
- higher version of your MS Excel app
- higher version of .Net Framework
schmimla
TestLink user
Posts: 3
Joined: Sat Nov 23, 2013 8:29 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by schmimla »

Has somebody already tried to add custom fields to Jacks code? I have some problems regarding this.

This is how i implemented it in the Xml.Writer.cs:

Code: Select all

        private void AppendCustomField(XmlNode newCustom_Fields, TestCase testCase)
        {
        	XmlElement newCustom_field = this.document.CreateElement(NODENAME_CUSTOM_FIELD);
      		newCustom_Fields.AppendChild(newCustom_field);
      		
      		this.AppendCDataElement(newCustom_field, NODENAME_CUSTOMNAME, "Approver");
        	this.AppendCDataElement(newCustom_field, NODENAME_CUSTOMVALUE_VALUE, testCase.Approver);        	
        	                                                      
        }
After compiling, when i try to import the XML file written by the new code, I get the following error message:
Test Case : 01.01.01 xxx : Value of Custom Field 'Approver' can not be imported because there is no Custom Field with this name and Available for Test Case on this Test Project
In my test Project, i added a custom field with name "Approver" before, and it is availablein my project, e.g I also see them in the filter box in the test specification.

Does somebody have an idea how to fix this?
schmimla
TestLink user
Posts: 3
Joined: Sat Nov 23, 2013 8:29 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by schmimla »

a late reply to this topic:

Jack and me solved the problems that were arising when I tried to import test cases with custom fields, and now everything works fine. Thanks to Jack here again!
krishnavooturi
TestLink user
Posts: 1
Joined: Sun Mar 09, 2014 10:31 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by krishnavooturi »

What would I need to make it work on Mac 10.9.2, with MS excel 2011.

I highly appreciate your response
jackzhang
TestLink user
Posts: 8
Joined: Wed Jan 30, 2013 7:03 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by jackzhang »

krishnavooturi wrote:What would I need to make it work on Mac 10.9.2, with MS excel 2011.

I highly appreciate your response
CrossOver or use a virtual machine? Just try... as I have no experience running it on Mac, either. :roll:
saayid
TestLink user
Posts: 4
Joined: Sat Apr 12, 2014 6:58 am

Re: Tool for converting test cases from Excel sheet to XML f

Post by saayid »

Hello Jack/Schmimla,

I am a QA analyst and i have been exploring Testlink and in the process while reading the forums read about your tool and i have tested the same. Thanks for publishing the tool and i am sure there are thousands of QA folks who would be benefiting from the same. I have a few questions listed below

a)I have downloaded Ex Converter and have been using version 1.2.1. Do you have a newer version of the tool?

b)How can i import when Custom Fields exist in the Test Case/Test Suites

c)Can code be tweaked to include Requirement Specification/Requirement uploads (Custom Fields exist)?


Thanks!
Saayid
Saayid Rahim
Qatar Fertilizer Company
Systems Analyst, SQA Team


Testlink Ver 1.9.9
jackzhang
TestLink user
Posts: 8
Joined: Wed Jan 30, 2013 7:03 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by jackzhang »

saayid wrote:Hello Jack/Schmimla,

I am a QA analyst and i have been exploring Testlink and in the process while reading the forums read about your tool and i have tested the same. Thanks for publishing the tool and i am sure there are thousands of QA folks who would be benefiting from the same. I have a few questions listed below

a)I have downloaded Ex Converter and have been using version 1.2.1. Do you have a newer version of the tool?

b)How can i import when Custom Fields exist in the Test Case/Test Suites

c)Can code be tweaked to include Requirement Specification/Requirement uploads (Custom Fields exist)?


Thanks!
Saayid
Hi, Saayid.

To answer your questions:
a) Sorry, no newer versions of this tool and if there is one, I will update it to Sourceforge. But not yet have a clear plan to extend features of this tool.
b) V1.2.1 does not support Custom Fields, but only those fields you can see on its UI.
c) Yes, you can modify the code as you wish to add features of Req specs converting. I'm sending you a trial version which converts only Req DocID/Title/Description (but may not suffice what you need...)
mastercooker
TestLink user
Posts: 4
Joined: Mon Dec 07, 2020 2:53 pm

Re: Tool for converting test cases from Excel sheet to XML f

Post by mastercooker »

schmimla wrote: Thu Jan 30, 2014 2:01 pm a late reply to this topic:

Jack and me solved the problems that were arising when I tried to import test cases with custom fields, and now everything works fine. Thanks to Jack here again!
Hello there i know that its VERY old topic, but is it possible for You to share modified converter?

Best regards
Post Reply