SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Anyone use the API script editor?

    I posted a similar question but have not gotten any response. I am working with the script editor and have been able to create atestset and populate it via VBScript. However it is adding it to the unattached folder right now. I need to be able to create a node under a child folder of Root and then create the testset in the new node. anyone ever done this or have an example of it?

    Thanks
    Wade

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    678
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Anyone use the API script editor?

    TestSetTreeManager
    TestSetFolder
    TestSetFactory

  3. #3
    Junior Member
    Join Date
    Mar 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Anyone use the API script editor?

    [ QUOTE ]
    TestSetTreeManager
    TestSetFolder
    TestSetFactory

    [/ QUOTE ]
    EAS,

    Thanks but I know that these are what I use. Below is the code I have so far and it creates a testset and a test folder. however the test set is placed in unattached and the folder is placed at the Root\. I need to get the testset to be added in the testfolder that is created. Any ideas on how to acheive this?

    Thanks
    Wade

    Function TestLab_ActionCanExecute(ActionName)
    On Error Resume Next
    if actionname = "TestLab_Action1" then
    Dim td
    'Connect through OTA
    Set td = TDConnection
    'Dim tdv
    'tdv = td.dbname
    '''''''''''''''''''''''''''''''''''''''''
    'Dim tfact As TestFactory
    Dim mytest
    Dim tsfact
    Dim mytestset
    Dim tstfact
    Dim mytst
    Dim rfact
    Dim myrun
    Dim tlist
    Dim tsFolder
    Dim tsFolderPath
    Dim Input
    Dim root
    Dim TreeMgr
    Dim labTreeMgr
    Dim labFolder
    Dim tsFolderInput
    'tdc is a TDConnection object. When this routine is run,
    ' the user is authenticated and connected to the project.
    Set TreeMgr = td.TreeManager
    Set TestF = td.TestFactory
    Set labTreeMgr = td.TestSetTreeManager
    '------------------------------------------
    '-----------------------------------------
    ' Test Lab
    '------------------------------------------
    'Get or create a test set folder
    tsFolderInput = InputBox("Enter your packages TIVOLI name without the ^ character.","QualityCenter Test Folder Creation")
    tsFolderPath = "Root\" & tsFolderInput
    Set labFolder = labTreeMgr.NodeByPath(tsFolderPath)
    If labFolder Is Nothing Then
    Set labTreeRoot = labTreeMgr.root
    Set labFolder = labTreeRoot.AddNode(tsFolderInput)
    labTreeRoot.Post
    End If
    '------------------------------------------
    'Add a new test set

    Input = InputBox("Enter your packages TIVOLI name without the ^ character.","QualityCenter TS Creation")
    'MsgBox (Input)
    Set tsfact = td.TestSetFactory
    Set mytestset = tsfact.AddItem((Input))
    mytestset.Status = "Open"
    mytestset.Post
    Dim sDriverArray(23,23)

    sDriverArray(0,1) = "BAND_Tivoli_Package_Install"
    sDriverArray(0,2) = "BAND_EDE_Pkg_Testing"
    sDriverArray(0,3) = "BAND_Post_Install"
    sDriverArray(0,4) = "BAND_Tivoli_Package_Promotion"
    sDriverArray(0,5) = "Access_Driver"
    sDriverArray(0,6) = "Adobe_Driver"
    sDriverArray(0,7) = "Excel_Driver"
    sDriverArray(0,8) = "HTML_DHTML_XML_Driver"
    sDriverArray(0,9) = "IE_Driver"
    sDriverArray(0,10) = "InfoPath_Driver"
    sDriverArray(0,11) = "JavaRT_Driver"
    sDriverArray(0,12) = "OfficeCommunicator_Driver"
    sDriverArray(0,13) = "OLE_Driver"
    sDriverArray(0,14) = "Outlook_Driver"
    sDriverArray(0,15) = "PowerPoint_Driver"
    sDriverArray(0,16) = "Prizm_Plugin_Driver"
    sDriverArray(0,17) = "QWS3270_Driver"
    sDriverArray(0,18) = "SMB_Driver"
    sDriverArray(0,19) = "Symantec_Driver"
    sDriverArray(0,20) = "WMP_Driver"
    sDriverArray(0,21) = "Word_Driver"
    sDriverArray(0,22) = "Zip_Driver"
    sDriverArray(0,23) = "DATABASE_CHECK_KEY"
    Set tstfact = mytestset.TSTestFactory
    Set tfact = td.TestFactory
    For i = 0 to 23
    Set tlist = tfact.NewList("select * from test where ts_name='" & sDriverArray(0,i) & "'")
    For Each ts In tlist
    tstfact.AddItem (ts.ID)
    Next
    Next
    MsgBox (Input & " was added to Unattached! Refresh unattached folder!")
    end if

    TestLab_ActionCanExecute = Project_DefaultRes
    On Error GoTo 0
    End Function

  4. #4
    Junior Member
    Join Date
    Mar 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Anyone use the API script editor?

    Knowone?????

  5. #5
    Advanced Member cgrzelka's Avatar
    Join Date
    Feb 2005
    Location
    Bordeaux, France
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Anyone use the API script editor?

    Instead of :
    <font class="small">Code:</font><hr /><pre>
    Set tsfact = td.TestSetFactory
    Set mytestset = tsfact.AddItem((Input))
    </pre><hr />

    which adds the test set to the 'Unattached' test set folder, use

    <font class="small">Code:</font><hr /><pre>
    Set tsfact = labFolder.TestSetFactory
    Set mytestset = tsfact.AddItem(Input)
    </pre><hr />

    that should add the test to the folder you just retrieved or created.

  6. #6
    Junior Member
    Join Date
    Mar 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Anyone use the API script editor?

    Awesome, thanks Christian!

 

 

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 © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:31 AM.

Copyright BetaSoft Inc.