Как скопировать папки с тестовым набором из одного места в другое, используя OTA
У меня есть требование скопировать все подпапки (вместе с наборами тестов в них) как подпапки в другой папке набора тестов
for eg., lets say i have test set folder
Root\TestSetFolder1
===TestsetSubfolder1
----testset1
---- testset2
====TestSetSubFolder2
-----testset3
----- testset4
i want all of the subfolders and test sets within those folders to be copied under a new test set folder location ,for eg
Root\TestSetFolder2
so after copy the destination folder should have
Root\TestSetFolder2
===TestsetSubfolder1
----testset1
---- testset2
====TestSetSubFolder2
-----testset3
----- testset4
here is the code`enter code here
how do i recursively copy only the subfolders
** Dim tdc, qcServer Set tdc = CreateObject ("TDApiOle80.TDConnection") qcServer = " http://server.com/" tdc.InitConnectionEx qcServer Dim qcUsername в виде строки Dim qcPassword в виде строки Dim QcDomain в качестве строки String Dim QPro qPro As TestSetTreeManager Dim sourceFolder As testSetFolder Dim destFolder As testSetFolder Dim iscp As ISupportCopyPaste Dim clipboard As String
qcUsername =InputBox("Enter QC User Name")
qcPassword = InputBox("Enter QC password")
tdc.Login qcUsername, qcPassword
If (tdc.LoggedIn = false) Then
MsgBox "QC User Authentication failed", vbInformation, "User Authentication"
End If
qcDomain = "FS1"
qcProject = "FQA1"
tdc.Connect qcDomain, qcProject
If (tdc.Connected = failed) Then
MsgBox ("QC Project not connected :" & qcProject), vbInformation, "Project Connection"
End If
call CopyPasteTestSetFolder("Root\F1\F3\F4","Root\F7\test_vb2")
Private Sub CopyPasteTestSetFolder(sourceFolderPath, destFolderPath)
Dim treeMng
Dim sourceFolder
Dim destFolder
Dim iscp
Dim clipboard
Set treeMng = tdc.TestSetTreeManager
Set sourceFolder = treeMng.NodeByPath(sourceFolderPath)
Set destFolder = treeMng.NodeByPath(destFolderPath)
Set iscp = sourceFolder
clipboard = iscp.CopyToClipBoard(sourceFolder.NodeID, 0, sourceFolderPath)
Set iscp = destFolder
iscp.PasteFromClipBoard clipboard, destFolder.NodeID, 0, -1
Set treeMng = Nothing
Set sourceFolder = Nothing
Set destFolder = Nothing
Set iscp = Nothing
End Sub `**
This is giving object is required 424 error at "Set treeMng = tdc.TestSetTreeManager " line