Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

How to add a new folder and subfolder to the QC Resource using OTA

$
0
0

Hi,

 

I am trying to add folder and Subfolders in ALM under Resource section using OTA.

I successfully created folder under Resources, but not able to find solution to add sub folders.

 

 

Option Explicit

Dim oALMConnection

 

CreateFolderInALMResources

 

Function CreateFolderInALMResources()

    Dim sALM, sDomain, sProject, sUserName, sPassword, resRoot, newFolder, testManager, root, subFolder1  

        'Quality Center Project settings

        sALM = "http://130.141.76.79:8080/qcbin/"

        sUserName = "Abhishek"

        sPassword = "Abhishek"

        sDomain = "DEFAULT"

        sProject = "Demo_Training"      

        

 

        '// STEP 1: Get the ALM Object and connect to the project 

        Set oALMConnection = CreateObject("TDApiOle80.TDConnection")

        oALMConnection.InitConnectionEx sALM

        oALMConnection.Login sUserName, sPassword

        If (oALMConnection.LoggedIn <> True) Then

            MsgBox "ALM User Authentication Failed"

           Set oALMConnection = nothing

            Exit Function

        End If

        oALMConnection.Connect sDomain, sProject

       

        ‘QCResourceFolderFactory Object

         Set resRoot = oALMConnection.QCResourceFolderFactory.Root

         Set newFolder = resRoot.QCResourceFolderFactory.AddItem(null)

         newFolder.ParentId = resRoot.ID

         newFolder.Name = “AbhishekFolder”

         newFolder.Post() 

 

           'Code to add subfolder

         Set testManager = oALMConnection.TreeManager

         Set root = testManager.NodeByPath(“Resource\AbhishekFolder\") 

         Set subFolder1=root.AddNode(“AbhishekSubFolder”)

    

         Set resRoot = nothing

         Set newFolder = nothing

End Function


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>