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

9 comments:

  1. Hi, I can't seem to get the requirements in at all. I just get a 'Warning' dialog box with no information. The Test suites/cases are fine and the xml looks good (as far as I can see). Has anyone else had this problem? I'm using Testlink 1.9.1 if that makes a difference. None of the columns are blank. Many thanks

    Dan

    ReplyDelete
    Replies
    1. Are you able to see the XML opened correctly in IE?

      Delete
  2. You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!!
    excel vba courses london

    ReplyDelete
  3. Thank you so much for the macro Gowri..It is really useful.

    ReplyDelete
  4. the code in the notes is not visible

    ReplyDelete
    Replies
    1. The xls file has code embedded in it. You should look in the macro editor in excel for the code.

      Delete
  5. Macro is very useful... Thanks Gowri.
    I tried deleting the requirements sheet but Macro didnt work.

    ReplyDelete
    Replies
    1. Hi Sheetal,
      Did you try deleting the Requirements column in TestCases sheet?

      Delete
  6. this macro gives me an error on this line

    xmlReqFileName = Left(xlsFileName, Len(xlsFileName) - extLen) & "_Req.xml"

    ReplyDelete