User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Kew Gardens, United States
    Post Thanks / Like
    Blog Entries
    2 Post(s)
    2 Thread(s)
    Total Downloaded

    Results to ALM - Looking for code example

    My client has a KW / Data Driven Framework written in UFT.

    At the end of a run it creates a reports such as a Word Document and Excel spreadsheet.

    I want the results to go back into ALM into the Run Results module or something better if you have any suggestions.

    I have seen the code for this a few times, but at each client site they had strict policies of copying code.

    If I try to figure this out using the HP Documentation it is going to take a long time and be frustrating.

    Does anyone have sample code to get me started on this ambition?


    When in Florida, Don't Tampa with the code. I made this up.

  2. #2
    Join Date
    Oct 2002
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)
    Total Downloaded
    your question is not completely clear to me
    see first the OTA manuals
    Reference to OTA COM TYPE Library manual HP ALM Open Test Architecture API Reference Version 12.50
    Reference to HP UFT repository util search CreateObject("Mercury.ObjectRepositoryUtil")
    Reference to HP UFT object library UFT Automation Object Model Reference

    suggestion is to write it from Excel VBA first with createobject("tdconnection.application") and setting the references to the otaclient.dll
    as its then much easier to step/debug then by using HP UFT immediately
        'tdc is the global TDConnection object.
       Set tdc = CreateObject("TDAPIOLE80.TDConnection")
       tdc.InitConnectionEx "http://localhost:8080/qcbin/"
       tdc.ConnectProjectEx "domain","project","user","pass"
        Set TSetFact = tdc.TestSetFactory
      set runf=tdc.runfactory
    from there on you can get a testset with a certain name
    add a new run
    Set NewRun = RunF.AddItem(Null)
    NewRun.Status = "No Run"
    NewRun.Name = "run 01"
    add the excel/word document as an attachment to the new run
    set myAttachments=newrun.attachments
    file = myattachments.AddItem()
    not 100% sure on above but this is another example
    AttachmentFactory attachmentFactory =   (AttachmentFactory)TstTest.Attachments;
                TDAPIOLELib.Attachment attachment = (TDAPIOLELib.Attachment)attachmentFactory.AddItem("demoAttach.txt");
                attachment.Description = "Bug Sample Attachment";
                IExtendedStorage exStrg = attachment.AttachmentStorage;
                exStrg.ClientPath = "E:\\TestData";
                exStrg.Save("demoAttach.txt", true);
    Last edited by elwinwildschut; 02-15-2017 at 03:44 AM.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.04%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:46 PM.

Copyright BetaSoft Inc.