SPONSORS:






User Tag List

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

    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?

    Thanks,

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

  2. #2
    Member
    Join Date
    Oct 2002
    Location
    amsterdam
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    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
    Code:
        '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
    Code:
    Set NewRun = RunF.AddItem(Null)
    NewRun.Status = "No Run"
    NewRun.Name = "run 01"
    NewRun.Post
    add the excel/word document as an attachment to the new run
    Code:
    set myAttachments=newrun.attachments
    file = myattachments.AddItem()
    not 100% sure on above but this is another example
    Code:
    AttachmentFactory attachmentFactory =   (AttachmentFactory)TstTest.Attachments;
                TDAPIOLELib.Attachment attachment = (TDAPIOLELib.Attachment)attachmentFactory.AddItem("demoAttach.txt");
                attachment.Description = "Bug Sample Attachment";
                attachment.Post();
                IExtendedStorage exStrg = attachment.AttachmentStorage;
                exStrg.ClientPath = "E:\\TestData";
                exStrg.Save("demoAttach.txt", true);
    Last edited by elwinwildschut; 02-15-2017 at 02:44 AM.

  3. #3
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,712
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Elwin,
    I appreciate your advice. I now have a starting point.
    I now know what to read and have some code to start from.
    Thanks,
    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

 

 

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 08:35 PM.

Copyright BetaSoft Inc.