Thursday, July 4, 2013

Requirements and Test Cases import to Testlink 1.9.x - Excel VBA Macro updated

Hi All,

After my hastened efforts to make a basic working macro for Testlink 1.9.x, I have taken some time to fix atleast a few of the issues.

You can find the latest macro here:
https://docs.google.com/file/d/0BzBCa6US6n8TV0ZTLXlZa25vcUk/edit?usp=sharing

In addition to what is supported that was mentioned in my previous post, here is a list of notes to give you an idea on why it might NOT be working for you.
  1. You need to have either Requirement Specification (Case Insensitive) or  Requirements(Case Insensitive)  in the first row of Requirements (Case Sensitive) worksheet.
  2. Under the Requirement Specification merged column header, you MUST have BOTH DocID (Case Insensitive) and Title (Case Insensitive) Columns.
  3. Under the Requirements merged column header, you MUST have BOTH DocID (Case Insensitive) and Title (Case Insensitive) Columns.
  4. You need to have either Test Suite (Case Insensitive) or  Test Cases (Case Insensitive) in the first row of TestCases (Case Sensitive) worksheet.
  5. Under the Test Suite column header, you must have Name (Case Insensitive) column. Details column is optional, including custom fields.
  6. Under the Test Cases column header, you must have Name (Case Insensitive) column. All the other columns are optional including custom fields.
  7. You can change the name of the Requirements Worksheet by changing the value of variable ReqSheet = "Requirements".
  8. You can change the name of the TestCases Worksheet by changing the value of variable TestSheet = "TestCases".
  9. You can change the name of all other columns by checking under all the SELECT CASE blocks. Please use only UPPER CASE letters in the macro, even though you may have used any case in your excel sheet.
  10. Once the macro completes running, you'll get a message box as follows.


  11. If one of the files were NOT generated, the error message will be displayed as follows.


  12. Please ignore the error if you do not have the "Requirements" worksheet or "TestCases" worksheet intentionally.
  13. Otherwise, check the column names in the worksheet where the error was reported.
  14. After generating the XML successfully, please open the XML on IE to ensure that the XML is NOT broken because of special characters like double quotes ("), angled brackets (<, >), etc. If so, please remove/replace these special characters and rerun the macro. Please note that this is a limitation of the XML and NOT the macro. You can replace these special characters by using the following table.
Character NameEntity ReferenceCharacter ReferenceNumeric Reference
Ampersand&&&#38;
Left angle bracket<<&#60;
Right angle bracket>>>
Straight quotation mark""'
Apostrophe''"

Please make sure to open the macro in IE, and make sure it opens up correctly, before you try to import it to Testlink.

Thursday, May 16, 2013

Excel VBA Macro for Requirements and Test Suites (or Test Cases) import from EXCEL to Testlink 1.9

Hi All,

The long awaited Testlink import macro for 1.9 is here. This is only a very basic version. Please let me know if you come across any issues. Follow the link to get the excel with macro.

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

Please make sure that there are no blank rows. This will make the macro run in infinite loop.
I don't have time to do the validations. If anybody has the time and does the validations, please share with me!

This macro includes support for the following fields:
Requirements:
  • Requirment Specification
    • Document ID
    • Title
    • Scope
    • Custom Fields
  • Requirements
    • Document ID
    • Title
    • Description
    • Status
    • Type
    • Expected Coverage
    • Custom Fields
  • Test Suite
    • Name
    • Details
    • Custom Fields
  • Test Cases
    • Name
    • Summary
    • Preconditions
    • Execution Type
    • Importance
    • Custom Fields
    • Multiple Requirements associated with Test Cases
Keywords import is NOT supported in Testlink.
 
The macro can perform the following imports:
  • Import Requirement Specification only
  • Import Requirements only
  • Import  Requirement Specification with Requirements
  • Import Test Suite only
  • Import Test Cases only
  • Import Test Suites with Test Cases
  • Import Test Cases with Requirements (single/multiple Doc IDs separated by commas)
  • Import Test Suites with Test Cases associated with Requirements
NOTE: If you are importing test cases for a single testsuite or multiple testsuites within an already existing test suite, you need to edit the test cases XML file and remove the following entries :
The second line in the testcases XML, which has the exact text as below:

and the last line in the same XML, which has the exact text as below:

Regards,
Gowri

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.