Thursday, November 12, 2009

Test Link - Import

 
Update: 13 August 2012

Hi All,

Sorry to the guys asking me help on Testlink 1.9.x :( I have stopped working now and do not have access to TestLink Server. But, in any case, do let me know if anybody has a demo server for the latest TestLink version or atleast the XML version of Requirements and Test Cases exported from TestLink.

Thanks and Regards,
Gowri

***************************
Update: 12 Jan 2012: Hi All,

Thanks to those who helped other readers overcome their issues with this macro. I am now going to work on troubleshooting tips and also upgrading this macro. So, please keep following this blog and go through the comments (there are so many helpful comments) if you have any issues with this macro.

Thanks.
****************

I have created an excel template with macro to generate xml for importing requirements/test cases/test suites to testlink. This macro will generate two xml files - one for requirement (excel sheet name_Req.xml) and oen for test cases (excel sheet name_Tc.xml)

Link to Excel Sheet:
http://spreadsheets.google.com/ccc?key=0AjBCa6US6n8TdDF1Zk1hNGd1MGtHYnJhSVhTVUxoZFE&hl=en

Link to macro: (Saved as .txt. Please open the vba editor in excel, copy-paste the text and save)
http://docs.google.com/Doc?docid=0ATBCa6US6n8TZGRodmh3Y2hfM2N4dmZrYmc1&hl=en

Imports supported are as follows: (The table should start from Row 1, Column 1 as given)
  • Import Requirements:
    The Excel format to be used is given below.
    Spec Title: The Requirement Specification Title (This can be left empty, since this is only for mapping requirements with test cases. But, this column must be present.)
    Document ID: This is the unique requirement reference number. (Must be unique when importing requirements. But, when importing test cases or test suites with requirements, multiple test cases can be mapped with single requirement. For more details, please see other import formats below.
    Req Title: This is the title of the requirement. This is also unique. Each Document ID is mapped with a Req Title.
    Description: This is the detailed description (Scope) of the requirement.

  • Import Test Cases:
    The Excel format to be used is given below.
    TC#: This is the Test Case Serial Number. It should start from 1 and be in sequence. This is also unique (even across test suites).
    Name: This is the Test Case Name. This is also unique for a test case.
    Summary: This is the Test Summary, a brief about the Test Scenario.
    Steps: This section is for writing the steps for execution of the test case.
    Expected Results: This is the results expected on executing the test case.

  • Import Test Suites with Test Cases:
    The Excel format to be used is given below.
    Name: Name of the Test Suite. Test Cases must be grouped under each Test Suite exactly as given below. This is unique.
    Details: Details about the Test Suite.

  • Import Test Cases with Requirements:
    The Excel format to be used is given below.

  • Import Test Cases with Custom fields:
    The Excel format to be used is given below.

  • Import Test Cases with Custom Fields and Requirements:
    The excel format to be used is given below.

  • Import Test Suite with requirements:
    The excel format to be used is given below.
  • Import Test Suite with Test Cases having Custom Fields:
  • The excel format to be used is given below.
  • Import Test Suite with Custom Fields and Requirements:
    The Excel format to be used is given below.

Feel free to use it and let me know your comments.

159 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi gowri,

    Thank you for posting info on testlink. I am working on importing testcases with custom fields to testlink. I have used the macro in my excel sheet but i dont see xml file generated.can you please help me in moving forward by giving some info on generating xml file and importing to xml.Also please share if you have some document.

    Thanks in advance for your help,
    Regards,

    ReplyDelete
  3. Hi Gowri,

    I found where xml getting stored.can you please let me know if it is possible to import requirements with custom fields just like importing testcases with custom fields.

    Regards,

    ReplyDelete
  4. Hi,

    I am using this script for testsuite uploading and edited the XL sheet as per this.
    I am getting some compile error while running this macro. could you help me.

    Thanks
    Bharathi

    ReplyDelete
  5. Following are the steps i followed,

    a) Copy the macro and paste in ur VBA editor
    b) Then save the file as Macro-enabled excel workbook. Then try running macro.

    Hope this helps...

    ReplyDelete
    Replies
    1. I am also getting a syntax error on the last function. I copied and pasted directly into the VBA project workbook. It is on the "Function lastColumn..." and "lastColumn = ..." lines. Any help or advice?

      Delete
  6. Hi Gowri,

    Great tool!!

    What if I want to associate keywords to my suite/test case? Can I add an additional column?

    Thanks!
    Nelson

    ReplyDelete
  7. Hi Rahul,

    TestLink does not support importing requirements with custom fields. Only importing custom fields for test cases is supported.

    Regards,
    Gowri

    ReplyDelete
  8. Hi Bharathi,

    I can help you if you can post details about the error you are getting.

    Regards,
    Gowri

    ReplyDelete
  9. Hi Nelson,

    We need to add a new column and also make code changes in the macro for importing test cases with keywords. It becomes troublesome if you need to import test cases with more than 1 keyword. For now, I can work on importing test cases with a single keyword. Please wait for my update on this :)

    ReplyDelete
  10. tx a lot ! its very helpfull

    ReplyDelete
  11. Can you please tell me how where is the xml file stored

    ReplyDelete
  12. The xml file is stored in the same location in which your excel file is stored. The XML for importing Requirements is stored as (your excel file name)_Req.xml and the XML for importing Test Cases is stored as (your excel file name)_Tc.xml.
    Hope this helps!

    ReplyDelete
  13. Hi Gowri,

    When i am trying to import requirements they all are getting loaded under one folder. Now i have enable tree(node) structure in testlink. Can you please let me know if i can import the reqs in different folder when loading.

    Many Thanks
    Testlinkuser

    ReplyDelete
  14. Hi Gowri:

    What a great plugin and template, it has not only been great for importing test cases, but has really helped me to get started understanding TestLink as well.

    One defect I have found is that if the data in an Excel cell contains quotes ("") then the script will not create a valid file.

    Looking forward to the enhancement that will allow multiple keywords, they are a large component of our TestLink implementation.

    ReplyDelete
  15. @Anonymous,

    We have not enabled the tree view for requirements. So, I don't think I can work ont his for now.

    @Ken,
    The files will be created if your cells have double quotes. But if the double quotes are special characters that look like open quotes and close quotes (slanting towards one side) unlike the straight looking double quotes, a valid file won't be created. So, please replace those double quotes with ordinary ones using 'Replace All' twice (one for open quotes and one for close quotes). Hope i am not confusing!!!!

    ReplyDelete
  16. hi Gowri,

    goood job,
    but when i import the .xml generated, the "TestLink" say :" Wrong XML test case file"

    can you help me plzz

    ReplyDelete
  17. Excellent Post Gowri. Keep it up.

    ReplyDelete
  18. Hello,

    I have the same problem as Med Atef. When I try to import the xml, there is the message "Wrong XML test case file"
    Can you help?

    Thank you

    ReplyDelete
  19. Hi Med Atef and Anonymous with "Wrong XML test case file" error. Please check that your xml file opens properly on Internet Explorer. Also make sure to choose Test Suite or Test Case import appropriately! Do let me know the results so that I can help you further!

    ReplyDelete
  20. Hi Gowri,

    thanks for your help. The xml file didn´t open on Internet Explorer with the message that there is a wrong character. So I checked my testcases and the problem were the german "Umlaute" like ü, ä, etc. Now the macro works correctly.
    Thank you!
    Greetings, Ann (Anonymous)

    ReplyDelete
  21. Hi,

    I want to export my test cases written in Excel to testlink I tried the above procedures by using macros. But no luck.
    I was able to generate the xml. But i wasunable to upload the same to testlink due to below error message:
    "wroung xml test case file."
    It will be very great full if any one can help mke in this regards.

    ReplyDelete
  22. Hi, Gowri,
    I used testlink 19.beta3. I found that import XML Result display it is success, but the data don't update in the db.

    Import TestCase data : Test Case 1-5 - version 1 - Tester: lyk - Result: passed - Execution Timestamp: '2010-10-27 15:34:54' - Imported!
    The DB not updated. Do you know why? Thank you!

    ReplyDelete
  23. Hi Gowri,

    Thank you so much for your template and macro! It is working great, it is helping me a lot with my work with Testlink.

    ReplyDelete
  24. Hello,

    Did you made an update for testlink 1.9 (Prague) version?

    ReplyDelete
  25. Great tool, just saved me a ton of time!
    There is a simple way to update this script for testlink 1.9, but it will only import the step as one step and expected result. as per this link:
    http://www.teamst.org/forum/viewtopic.php?f=11&t=3287&start=0
    you can do a search and replace in the VBA code where the xml is generated for the element. I verified this works. I am going to see if I can enhance this vba code to allow for multiple step import. I will post the code if I get it to work. Note we are not planning to import requirements, so I'm not sure if there are changes to xml there as well.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Here are the changes I made from the post to get the Macro importing to TestLink 1.9.3 with steps.

      http://pastebin.com/wapuG1fC

      Thanks,

      -Josh

      Delete
    3. Hi Josh,

      I tried to use your macro but it imported each step as a separate case.
      Could you upload a sample sheet for us to see the layout.

      Delete
  26. How to get let say 8 steps and 8 expected results per test case, I can't figure out. If the macro need to be change, can we se the change to be made? Thanks

    ReplyDelete
  27. Sue, did you get success with changin the VBA code for the multiple step import for 1.9? If yes, where is it posted?

    ReplyDelete
  28. Hi Gowri,

    Great tool and so simple to use! Worked like a charm the very first time. For importing testcases with steps in TL 1.9, the macro has to be slightly changed - Replace with ""
    and voila!

    One question though - How do I import Test results and Notes? I tried adding the tags b
    blockiert to the XML but its not getting imported.

    Any suggestions?

    Tx,
    Sands

    ReplyDelete
    Replies
    1. Hi Sands,

      I have not used import function for the test results. But, you can export a test case that already has the Test Result, look at the XML and make changes to the macro accordingly.

      Delete
  29. Does anyone have the latest macro which can be used to import test cases with multiple steps? Highly appreciate if they can share the macro code here. Thanks!

    ReplyDelete
  30. Any suggestions considering the umlaut problem? As a german user, i cant import requirements or testcases to TL because of this problem.

    ReplyDelete
  31. Hi, I have a different problem regarding requirements import: Our requirements were successfully imported and show correct Umlauts, however if we SEARCH requirements (by scope) it won't find anything with an Umlaut unless we "escape" them to html-entities in the search entry field, e.g. instead of "Übersetzung" wie must type "Übersetzung"... any trick here to have testlink do this for us automatically?

    ReplyDelete
  32. @Anonymous November 22, please check if details this URL can solve your problem.

    http://www.daniweb.com/web-development/php/threads/232363

    Also, if you can explain here for Anonymous November 21 on how you dealt with umlauts, it would of help to some people. I guess it has something to do with setting encoding to Unicode in the XML generated. But I am not sure how. Please share here if you are aware. Thanks.

    ReplyDelete
  33. @Anonymous April 25, multiple steps can be inserted by keeping all the steps in the same cell and using XML list tags. (I have removed angle brackets on both ends of line. Pls include it)

    Eg:
    ol>
    li>step1<\li
    li>step2<\li
    <\ol

    Hope this helps!

    ReplyDelete
    Replies
    1. Could you kindly explain a little bit in detail how to implement these steps in the marco in order to have multiple steps and expected results?

      Delete
    2. You need to include this in the excel column that has multiple steps.you need not do anything to the macro.

      Delete
  34. For those who receive the wrong XML error, please open the generated file in IE and check if it opens properly. Otherwise there may be some special characters, which need to be removed. Also, there are 2 different types of import. One is import test suites and the other is test cases within a test suite. Please make sure you choose the right one.

    ReplyDelete
  35. Hi,

    I'm using Testlink1.9.3 Version. i'm able import the cases via XML.. But not able to import via xls.. infact, i've tried using this template as well.. but no luck..

    for me xml is not getting generated.. i think, there something wrong i'm doing it.. not able to debug.. i've followed exactly same steps but ..nothing heppens.. any help pls..

    ReplyDelete
  36. Can any one. provide exact steps.. which need to follow to use this template.

    ReplyDelete
  37. @Anonymous Dec 22, 2011: you CANNOT upload (import) the excel directly in testlink. You need to use the macro and generate the XML using the excel with the steps EXACTLY as mentioned in the blog.

    ReplyDelete
  38. Thanks for the info so quickly. i really appreciate .. atleast i was not aware of.. but , there is an option to import XLS TL.

    another point.. how to generate the xml file.. after putting macro in VBA, and saving as micro enabled file.. what needs to be done.. ?

    ReplyDelete
  39. Kindly help for how to generate xml from xls.. very urgently needed.. i got stuck up ..

    ReplyDelete
  40. You need to run the macro from the excel sheet. It will generate 2 XML files. One for requirements and one for test cases.

    ReplyDelete
  41. After running the macro, getting Compile error ....syntax error @ "If reqColCount «» 0 Then"

    what is the solution for this .. ?

    ReplyDelete
  42. Looks like you don't have any requirements to import from the excel sheet, but still have the requirements column in the excel. You need to read and understand the steps without blindly following them.

    ReplyDelete
    Replies
    1. Hi Gowri

      Greetings !!!!

      still we are having issues in importing the testcases in testlink 1.9.3. Could you please help us with an excel sheet where we can write the testcases and generate XML and upload it to testlink. We are using version 1.9.3
      sreeram.krishna atttt gmaildotcom

      Delete
  43. Have to replace the "«»" with "<>", etc to solve syntax errors.

    Also, have to set the options in Excel2010 to "Dev mode" by File->Options->Custom Ribbon->checkbox Developer.

    It then Works Great!
    Great job!
    Much appreciated!

    ReplyDelete
  44. Hi,

    Everything is working perfect but I am not able to import steps and expected result by xml generated from micro.
    can you please help me out?

    Thanks in advance.
    Raj

    ReplyDelete
  45. To Raj,
    In Testlink Manually create a test case with steps in it.
    Then export that to XML.
    Inspect the XML you will find that you need to modify the Case Statement for "Step".

    ReplyDelete
  46. Hi raj,

    We are still facing the same issue in 1.9.3 Steps are not getting imported. Could you please help us on this

    sreeramdotkrishnaatgmail.com

    ReplyDelete
  47. Hi,

    I am facing some issue while importing xls file.
    It displays an error "The filename C:\wamp\www\testlink-1.9.0\testlink-1.9.0\gui\templates_c\ub7qqr6qtq87v3h2t5hpderkg3-importtcs.xls is not readable" Could you Please Help me with this issue and let me know ASAP

    ReplyDelete
  48. Same issue.. not able to import steps and expected results using xml file. Much appreciated if you could help.

    Sushmitha

    ReplyDelete
  49. How can I update my test case with changing its test case ID and without updating one by one as I need to update almost 100 hundred test cases before execution.

    ReplyDelete
  50. I am using TestLink 1.9.3. How can I update my test case without changing its test case ID and without updating one by one as I need to update almost 100 hundred test cases before execution.

    ReplyDelete
    Replies
    1. Hi,
      To update already existing test cases on testlink, follow the steps below:
      1. Export the test cases to be updated, from testlink in XML format.
      2. Open the generated XML file in Microsoft Excel.
      3. Make the required changes to the XML file using Microsoft Excel.
      4. Save the file in XML format.
      5. Upload this file in testlink using the import function as usual.

      Delete
  51. Hi,
    Managed to get the xml generated for a single test case with multiple steps. However, when I import, the steps are not imported - the test case is appearing on the tree with summary.
    I tried to import only a single test case with multiple steps (using the list tag as suggested in one comment) and used the import from the Test Case level. Can you please help in identifying the issue?

    ReplyDelete
    Replies
    1. Hi,

      The list tag works only for test link 1.8.x and not for 1.9.x as the database has changed. You can export one test case with multiple steps. Look at the XML and change the macro accordingly.

      Delete
  52. Can you please send me the macro to upload requirement specification to testlink along with the main suite and sub suite. My Email id id : Digvijay.won@gmail.com.

    Thanks
    Digvijay

    ReplyDelete
    Replies
    1. I have shared the macro to help you. It is upto you to modify it according to your own requirements. Please refrain from posting such requests!

      Delete
  53. Hi Gowri,

    Seems to be people are using different versions of Testlink 1.8.x OR 1.9.x, different Excel 97-2003 OR 2010. And that is causing confusion among people. Few things working for some people & few not.
    If you could write a general comment from architect perspective, it would help all.
    By architect perspective I mean, how testlink behaves differently in case of 1.8.x & 1.9.x at the same time for Excel 2003, 2007 & 2010.

    Also I would appreciate, if you could also mention how to generate/write this macro code depending upon requirements what people want to import from Excel --> XML --> Testlink.

    Thanks,
    Ravi

    ReplyDelete
    Replies
    1. Hi Ravi,

      Thanks for your comment. But I hope you understand that it is NOT my job to find out the difference betwwen different testlink/excel versions and explain it to people.

      I am only sharing my work so it will be helpful to some people. Then, it is upto you to understand what it is doing (I have provided as much comments I can in the macro).

      You are free to use my macro, modify it. YOU have to put in that 'little effort' to understand the macro and make it work for you.

      Also, I would appreciate, if you can share your findings, IF you put in that extra effort...

      Regards,
      Gowri

      Delete
  54. I did the following:
    1. Open the template with Excel2012.
    2. Enable Developer tab.
    3. Open VB editor - View - Code
    4. Paste the Macro text.
    5. Save it as "Excel Macro-Enable template(*.xltm)"
    6. Open the xltm file.
    7. Run "Sheet2.genRegnTcArr" Macro file.
    8. And Then get "400" error.

    Would you please help to figure out the issue?

    Thank you very much.

    ReplyDelete
    Replies
    1. Hi Ray Zhang,

      Will you be able to share your excel ?(you don't need to have any data in it)

      Regards,
      Gowri

      Delete
  55. the imported test cases do not have steps is there an updated version that supplies this ?

    ReplyDelete
    Replies
    1. Hi Margot,

      This macro will work only for Testlink version 1.8.x. For version 1.9.x you need to modify the macro as the XML has changed because of Testlink DB change in 1.9.x. You can read through the comments for some guidance on modifying the macro, as I don't have access to Testlink 1.9.x right now. Sorry for not being to able to help.

      Delete
  56. I'm also using the TestLink version 1.9.4. Everything works great with the macro, but I still have the problem to generate steps and the expected results. Does anybody have a solution, which can be explained in detail?
    Thanks a lot...

    ReplyDelete
  57. Hi everybody,
    here is again the "Anonymous" from September 17, 2012. There is another question I've forgot yesterday: What is with the preconditions you can add to the test cases in TestLink 1.9.4? Is there also an opportunity to write the preconditions in the excel sheet and import them together with the other informations in TestLink?
    I would be very grateful for help!

    ReplyDelete
  58. Hi Gowri,
    when I run the macro am getting compile error as "Expected End Sub".Could you please help on this.
    I have used the same excel file as you shown above in "Import Test Case"

    Thanks,
    Siva

    ReplyDelete
    Replies
    1. Take a look at your macro. For every 'Sub' there MUST be an 'End Sub '

      Delete
  59. Hi,
    Now I can run the macro query without error but XML file not generated.

    Please help,
    Regards,
    Siva

    ReplyDelete
    Replies
    1. I can help you with this only if you share your xls with me. Without it, I really can't make out what's wrong...

      Delete
  60. I get: The webpage at ... might be temporarily down or it may have moved permanently to a new web address.

    Are the doc up? pls, could give me other links?

    Does the macro work for TestLink 1.9.4?

    ReplyDelete
    Replies
    1. Hi Elissa,

      I have checked the links to be working fine. Please try again. The macro works for 1.8.x. You need to modify the macro to make it work for 1.9.x.

      Regards,
      Gowri

      Delete
  61. Can you paste the changes needed to make the macro work for 1.9 - I have been banging my head trying to figure this out for the last two hours.

    ReplyDelete
    Replies
    1. Sorry as mentioned above, I do not have access to Testlink 1.9.x.

      Delete
  62. I was wondering if you could import the test cases with a link to a requirement it tests? So you don't have to do the linking inside testlink one by one with a mouse...

    ReplyDelete
    Replies
    1. Yes you can. Please refer to 'Import test cases with requirements' section above.

      Delete
  63. I am new to Testlink. I have added only one test suite and one test case under that and try to umport to Testlink. Getting "Wrong XML test case file". Could some one help me to resolve the issue.

    Note: I am able to open the xml file in explorer.

    ReplyDelete
  64. Thanks a lot for the Macro.

    I have issues in importing the data of the custom fields.

    I am using Test Link version 1.9.3. I have two custom fields in my excel. While importing, I see no error message throwing out in Test Link. But when I look into the .xml file, I see that instead of reading one cell of the custom field, the whole complete columns are read and then it is moved to the next custom field data first row. From there it reads again the whole columns of the second custom field data.

    I want the custom field data to be read by per test case. But this is not happening. I am new to Test Link and to the VB script. Could any body please help me out on this?

    ReplyDelete
  65. Hi Gowri,

    Thanks for all your efforts to bring all under one roof. i was using your vb code and trying to enhance, where as to add "Keywords" and "ExecutionType",
    but am getting an error while adding and not able to run Macro.
    Your help is needed.

    Thanks
    Sridarr

    ReplyDelete
    Replies
    1. Hi Sridarr,

      You won't be able to use the macro for 1.9.x as it was written for 1.8.x, as the database has undergone changes between these 2 versions.

      Regards,
      Gowri

      Delete
  66. Hi Gowri,

    As per your xml convert code and xls template in TestLink1.9.3, i am not getting Steps and Expected results. can you please helpme on this.

    Thanks
    MKT

    ReplyDelete
  67. Hi MKT,

    You won't be able to use this macro for 1.9.x as it was meant for 1.9.x.

    Regards,
    Gowri

    ReplyDelete
  68. Hi Gowri,
    thanks for your reply, i have some custom made macro which is currently creating XML and using with 1.9.3 ver.
    But it is very uncertain when i am importing XML for testcases with requirement mapping sometime is the import is failing and not sure why, if just add few test cases it works, then agian giving an error as importing Failed.

    Could you please tell me if you have any other solution for this.

    Thanks
    MKT

    ReplyDelete
    Replies
    1. Hi MKT,

      I will be able to help you if I can see your excel sheet along with the macro. Otherwise, I can't know what's wrong.

      Regards,
      Gowri

      Delete
  69. Hi Gowri. thanks for your prompt reply. please find the attached xls with macro.

    ReplyDelete
    Replies
    1. Hi,

      Please let me know if the modified macro works fine. By the way, please check the generated XML by opening it in a browser, before using it for import.

      Regards,
      Gowri

      Delete
  70. Hi Gowri please share your email id to send the same

    Thanks
    MKT

    ReplyDelete
  71. Hi Gowri
    Can you please share your email id. I have used the versions you have posted from nearly 2 years ago and have added some enhancements on the way such as:
    - Adding checks and notifying user to common user mistakes in the input Excel sheet:
    + Not numbering the execution / expected result steps.
    + Execution/Result Step is not numeric nor a bullet.
    + Empty lines in steps.
    + More expected results then action steps.
    + Generated XML filesize is larger than the size supported by TestLink.
    + Sanity checks against common TestLink's import warning xml_load_ko
    - Character conversion for unsupported characters
    The code base has increased quite a bit and I'm looking at a way to share this with the TestLink user community.

    ReplyDelete
    Replies
    1. Hi Alpay Ersoy
      it seems you have solved most of the reported problems.
      Could you please share the new macro.

      Delete
  72. Is there a way to upload the complete Excel workbook?

    ReplyDelete
    Replies
    1. Can u send Your changed version of XLS2XML converter to me, please? Or give the link? andrey.volovich@gmail.com
      Thanks.

      Delete
    2. Works great!
      The main feature for me is that Your macro convert steps correctly.
      I think, it is necessary for all to post Your variant.
      I searched for it for 4 days and even created a simple program to convert csv2xml for TestLink on Python.
      But it was not so quick and comfortable as this macro.
      Thanks a lot!

      Delete
  73. I tried to upload .xls file to Testlink.

    Steps while I followed:

    1. Logged in to Testlink
    2. Went to my project >> Click on Edit Test cases >> Clicked on the desired test suite >> Click on "Import Test case >>

    3. Changes XML to XLS from the drop down menu
    4. Chosen .xls file from my computer
    5. Clicked on upload


    But nothing happened, my screen was just blank.

    ReplyDelete
    Replies
    1. Any help will really be appreciated.

      Thank you so much in advance

      Delete
  74. The tool which has been described here is for generating an XML file from Excel (XLS/XLSM). Make sure you run the macro from Excel to generate the XML file and then you can import it in TestLink using the file type XML. Send an email to me (gaersoygmailcom) your e-mail address so that I can provide the Excel workbook which I have made for generating XML files.

    ReplyDelete
  75. Hello guys! i'm kinda new to testlink, i already know how to import the test cases and test requirements using the macro that gowri made. i modified some of the codes to add some custom fields in test requirements which include the status and type. Now, my problem is that when i try to import the test requirements the status and type doesnt show in the test link. I can't figure out the code in macro that can read the dropdown menu in test link which is status and type. Any help will be much appreciated. thanks!

    ReplyDelete
  76. I added UTF-8 support to Your macro, which allows to add requirements and test cases in Russian.

    It can be useful for my Russian colleagues :)

    Take it here: https://docs.google.com/file/d/0B4nt80DosU8YaUpWcWZjaWQxOW8/edit?usp=sharing

    ReplyDelete
  77. Thanks Andrey and Alpay :) glad to see the work I did is being made better :)

    ReplyDelete
  78. Hello all,

    Can anyone tell me how to impport test cases from .xls to testlink.

    ReplyDelete
    Replies
    1. Go to the link I've posted and use the macro

      Delete
  79. The Alpay Ersoy version of Excel2TestlinkXML Macro:

    https://docs.google.com/file/d/0B4nt80DosU8YTDg2dFVyWVVrbDA/edit?usp=sharing

    Thanks to this guy! I use his version and it is very good.

    ReplyDelete
    Replies
    1. Hi Andrey and Alpay. Thank you for sharing your work on my blog. I'll provide the link to your spreadshsst on my blog.

      Delete
  80. Will there be a support for the execution type column anytime soon?

    ReplyDelete
    Replies
    1. Setting the execution type of the test case (and automatically setting the execution type of the test steps) is in the pipeline land will be made available together with UTF8 support.

      Delete
  81. Hi Alpay,

    Thanks for the response.

    To Anonymous (May 15, 2013 at 10:38 AM),
    if you are using my macro, it should be easy to include execution type column in the excel sheet and make very few changes to the macro for it to work.

    Regards,
    Gowri

    ReplyDelete
    Replies
    1. Can you elaborate on the changes?

      Delete
  82. Thank you very much for sharing the tool "Excel2TestlinkXML"!. It works perfectly

    ReplyDelete
  83. I create some test cases in TestCaseOnlyTestSheet and generate XML file. It always generate TCs in GoodExampleTestCasOnly sheet. How to fix it please?

    ReplyDelete
  84. Here are the steps:
    0. Open the Excel workbook, make sure you have macros enabled.
    1. Via the Instructions worksheet create an empty worksheet (SheetX) using one of the buttons ("Create New Test Cases and Requirements Sheet ..") or use the worksheet GoodExampleTestCasesOnly.
    2. In the worksheet you have created or you are using (SheetX) specify your test cases taking into account the restrictions (see the example sheets).
    3. Once you are ready with specifying, select the Instructions worksheet.
    4. Fill in the name SheetX of the Source Worksheet (in the file I sent you, it is called GoodExampleTestCasesOnly)
    5. In the Instructions worksheet press the "Generate XML files" button.
    6. The Excel macro will generate the XML file at the location where the Excel workbook was. If the guidelines have not been followed you will get review comments or pop-ups warning you.
    7. In TestLink via Test Specification tab, you can select the Test Suite where you want to import the generated XML file.

    ReplyDelete
  85. Is it possible to add custom columns?

    ReplyDelete
    Replies
    1. Yes it is possible to add custom fields as a column.

      Delete
  86. I got this error: The input variable or file you are trying to access doesn't exist. Stopping the macro. Would you be able to give some ideas as to what that error means?

    Any help is much appreciated!!

    ReplyDelete
    Replies
    1. Hi Angela,

      Which of the 3 versions of the macro are you using? Also, at what point are you getting this error?

      Regards,
      Gowri

      Delete
  87. Hi Gowri,

    We have a column for the execution type for each step and another column called "Automated Test ID" for all the steps that that are automated corresponding to the individual steps. I understand that in the macro, the execution type is hard coded to manual. Can you please provide some insight on how I can make it work for the columns I discussed? I'm not very advanced with macro coding.

    Thanks much,


    Angela

    ReplyDelete
    Replies
    1. Hi Angela,

      Are you using this macro? The Test Execution Type and Step Execution Type have been implemented here.

      The column names can be changed, but make sure you change it in the macro as well. that is replace "TEST EXECUTION TYPE" and "STEP EXECUTION TYPE" in the 'Select - Case' Block, with your column name in CAPITAL LETTERS.
      https://docs.google.com/file/d/0BzBCa6US6n8TV0ZTLXlZa25vcUk/edit?usp=sharing

      Regards,
      Gowri

      Delete
  88. This is a bit off topic but I was wondering if anyone has had trouble importing custom columns? I'm using TestLink v1.9.6 and I keep getting the error that my column name is wrong. I tried putting the name of the custom field I created, the label, and even the database ID of the field in the custom fields table. None of it worked.

    ReplyDelete
    Replies
    1. By the way I did search the forums but couldn't find an answer.

      Delete
  89. In TestLink execute an export of test cases/suite in xml format. Compare the exported file with the file which has been generated by Gowri's Excel macro. The custom fields should be the same.

    ReplyDelete
    Replies
    1. Thanks Alpay! I tried that and I found that this was the error. The name of the field as saved in my project is "Label Test Case ID" but it has a bunch of white spaces after it making 64 characters long as "Label Test Case ID ". When I tried to import it with the white spaces, the white spaces got removed after the import for some reason. If I open my .xml file in the browser, I see the white spaces. After I try to import the file, the white spaces are gone and I get an error saying the name doesn't match.

      I registered for a forum account, just waiting so I can post there.

      Delete
    2. Sorry by saying "just waiting so I can post there" I mean waiting for the email to confirm my registration.

      Delete
    3. Hi Angela,

      It is because I could have used the TRIM function. Or, you need to give the name of the custom field with the 64 characters length in the excel sheet. You need to remove the TRIM function in the macro (only for this particular field) and also make sure to have the whitespaces in the column name.

      Regards,
      Gowri

      Delete
    4. Also, if you are able to see the whitespaces in the browser, I am not sure how I could help :( as it would be how Testlink import works.

      Regards,
      Gowri

      Delete
  90. This comment has been removed by the author.

    ReplyDelete
  91. Hi Gowri,

    Using your macro, I found a bug in generating the XML with more than one custom field from the following code block:

    'Get the Test cases custom fields if any

    The result is an extra tag (see below) in between the multiple custom fields.

    custom_fields>
    custom_field>
    name>/name
    value>/value
    custom_fields
    custom_field>
    name>/name
    value>/value
    </custom_fields

    Other than that, the macro works beautifully! Thanks so much for providing it!

    ReplyDelete
    Replies
    1. Hi Angela,

      Thanks for pointing it out :) As this was a work done in a hurry for a friend, I did not test it as much as I would like. I am depending on people who are using the macro to provide me helpful feedback, as I myself am not using it.

      Thank you for your help again!
      Regards,
      Gowri

      Delete
    2. Also, I'll try to get to fixing this as soon as I can!

      Delete
    3. Angela,

      For the extra tag issue between custom fields do you have a fix for macro? If so it would be really great if you could share the same...

      Thank you and Good Day!
      Saayid

      Delete
  92. Hi Everyone,

    can u please help me out for import functionality through the test link.

    ReplyDelete
    Replies
    1. Hi,

      Thestep by step instructions, with screenshots are available above for testlink import. What more details do you need?

      Regards,
      Gowri

      Delete
  93. Hi Gowri,
    I will appreciate your efforts in providing the information on testlink.

    I am new to the testlink,we recently started using Testlink in our company, We are facing some problems while executing the test cases as the testcase no's are not feature based.Could you please let me know
    How can we make test case no's independent based on the feature
    Ex:
    Feature 1
    TC1
    TC2
    TC3
    Feature2
    TC1
    TC2
    TC3

    Is it possible ?

    Thanks
    Vijay

    ReplyDelete
    Replies
    1. Hi Vijay,

      I really don't understand your question. Please give more information on what you actually need.

      Regards,
      Gowri

      Delete
  94. I try to user to use the your suggestions in TestLink 1.9.7, but happen that in the test case import, the sections precondition and steps don't load, can you help me?

    ReplyDelete
    Replies
    1. Are you using Gowri's or Alpay's tool?

      Delete
  95. Alpay, Love the Excel tool.

    I had a question I am not sure I have seen in the thread. I tend to use multiple layers of Test Suites to break up test cases in different sections. Does the tool support a means to do multiple layers of Test Suites?

    Example:
    Test Suite Area 1.0
    Test Sub Suite Area 1.1
    Test Section 1.1.1
    followed by test cases
    TC1
    TC2
    TC3

    I figure if the tool does not support this option I may have an import area in Test Link then move the test cases to the appropriate test section created manually.

    Thanks again for the tool :)

    Charles

    ReplyDelete
  96. Charles, thanks for the positive remarks. :-)
    The tool does not support multiple layers of Test Suites. You can use different sub-test suites and once you have imported the xml, move them manually to the correct suite. Support for multiple layers is not in the roadmap either.

    ReplyDelete
    Replies
    1. Hello Alpay,

      I am in the process of exploring Testlink and i have used your tool. Thanks for sharing the same and for automating and making the import process simple. If it is possible could you share the workbook password /macro script at saayid21@gmail.com so that we can tweak it slighlty for our internal use?

      Thanks again and appreciate for sharing the tool!

      Have an excellent day..!
      Saayid

      Delete
  97. Thanks for the Reply Alpay,

    I have been using Testlink 1.9.7 and it appears I can import at the lower level suites.
    The only thing I found is I dont need to create the Last Sub suite name Example "1.1.1"
    Because if that is the name of your suite in the tool then it will create that suite name below the level you import.

    Thus I ended up with
    1.1.1
    1.1.1

    So I just moved them but I suspect that I could have just no created the last suite name (1.1.1) by hand and let the import process create it for me.

    Just passing on what I found :)

    Thanks :)

    Charles

    ReplyDelete
  98. Alpay,

    New question: My test team is hoping to modify the Requirement field "Status" to "Test Method".

    I noticed the macro is password protected. Is there a way I can get the password to modify the macro to adjust the field or if we could get a copy of the Macro script so we could modify it.

    Any help would be great. I can provide you with my email address if needed.

    Thanks :)

    Charles

    ReplyDelete
    Replies
    1. You can do it in the macro. It is NOT password protected. I am not sure why a few people are being asked for passwords as I have set it to Public. But it the older version. Please get the latest excel spreadsheet with macro from here.
      http://testlink-import.blogspot.sg/2013_07_01_archive.html

      Delete
  99. Charles: The Requirement Status field is a fixed field of Testlink. If you change it as proposed, you will not be able tot import the generated xml in TestLink. You can test this by adapting the generated xml. Does Testlink also support custom fields in Requirements?

    Gowri: I have password protected my macros, just to make sure I do nog have tot give support for modified code.

    ReplyDelete
    Replies
    1. Hi Alpay,

      Sorry, I didn't notice that the question was addressed to you :)

      I think it is possible to change the name of the Status field in Testlink (in enGB I guess). But I am not sure if the original poster has done this already! And, import still can work as it will still populate under status tag as the XML tags itself are hardcoded in the macro. We just need to include Case "Test Method" along with Case "Status"

      Regards,
      Gowri

      Delete
  100. Yeah we were considering modifying the PHP code to change the field in TestLink also. But I understand it may affect the import process. I will do some testing and see if we should leave it set to Status but if we can modify the field to allow for a different set of fixed values that can be imported. Such as "Inspection" or "Analysis". All of our requirements are considered "Implemented" already since our requirements are provided to us by our client.

    If we can just change the title of the field in TestLink and leave the node set to "Status" for XML but allow for a different set of data values I think we should be good.

    Thanks for the quick reply.

    Charles

    ReplyDelete
  101. Gowri,

    Part of your response reminded me of a question. I have been setting users manually to English US but is there a way to set the default English use? Not sure if it matters too much. I suspect only a few field items are different from English GB and English US.

    We can check out changing the naming of the field using the "Internationalization" for the field. I still need to figure out how to modify the data that can be stored in the field to include new items. Or is it possible with naming fields to change the data stored for "Status" from items like "Draft" to something like "Inspection"?

    Charles

    ReplyDelete
    Replies
    1. Hi Charles,
      You should be able to set default language in testlink in config.inc.php. The parameter to set is $ g_default_language. The original import will work fine even if you change the name of the field in locale.

      Delete
  102. hi,
    plz tell me what settings i hve to so if need custom fields to appear horizontally?? and
    when we use more than one custom field than we are no able to import the test case? plz tell the solution.

    ReplyDelete
    Replies
    1. Just add columns with Custom field name as header

      Delete
  103. Hello All,

    Gowri.. thanks for the excel macro.. works well.. was wondering how i can add extra custom fields to the requirements/Test Suite/Case templates ???

    Anyone who has an answer for the same or any help on what needs to be tweeked would be really helpful!

    Thank you all! Forum's highly informative and really helpful!

    ReplyDelete
    Replies
    1. Just add columns with Custom field name as header

      Delete
  104. Hello Sir/Ma'm

    I would like to know, can we assign the issues from one project to other.

    Thanks

    ReplyDelete
    Replies
    1. Nope, this is not possible in Testlink.

      Delete
  105. Hi,
    I am converting .xlsx file to .xml and then trying to import it into testlink. I am getting error Load_xml_ko
    Please, help in this.
    I wanted to import .xlsx files to the testlink

    ReplyDelete
    Replies
    1. If you used my macro to convert the xlsx to xml, please make sure you can open the xml file with IE and view it.

      Delete
  106. I have increased the size of Test case name but when I import it using xml file, testcase name is getting truncated after 100 characters.. Any help in this???

    ReplyDelete
    Replies
    1. I think you have to increase the test case name in config file as well. Don't remember the exact variable name. But, should be easy enough to figure out, if you take a look. Might also need to increase the length of the database column.

      Delete