Results 1 to 4 of 4
  1. #1

    Function Call from Recovery using relative path at QC

    Hello Everyone,
    I know many of you are not really using recovery scenario, but i am using it efficiently in my scripts when i am running it from my local system.

    I am facing issues when i am running my scripts from Quality Center, recovery operation is not able to find the function called while test is failing,

    my recovery at local

    C:\FrameworkFolder\TestResources\TestRecovery\Reco veryFunctions.qfl
    C:\FrameworkFolder\TestResources\TestRecovery\Reco very.qrs
    C:\FrameworkFolder\TestScript\Test1 (This is automation script)

    I am giving ..\..\TestRecovery\RecoveryFunctions.qfl (in the function call)

    path at QC

    Subject\FrameworkFolder\TestResources\TestRecovery \RecoveryFunctions.qfl
    Subject\FrameworkFolder\TestResources\TestRecovery \Recovery.qrs
    Subject\FrameworkFolder\TestScript\Test1 (This is automation script)

    but when QTP is running from QC path and everything gets changed and scripts runs at local\temp folders

    Any solution!
    Manish Bansal

    Checkout Blog Page At

  2. #2

    Re: Function Call from Recovery using relative path at QC


    When you are trying to attch the any file from Qc path.you have to download those file into local and remove the appeneded Qc temp pat like(All_Folderid_) then you can attch the file into QTP using recovery scenario utility


  3. #3

    Re: Function Call from Recovery using relative path at QC

    example code:
    Public Function DownloadAttachment(TDAttachmentName, TDFolderPath, bMovetoRoot)

    Dim otaAttachmentFactory 'As TDAPIOLELib.AttachmentFactory
    Dim otaAttachment 'As TDAPIOLELib.Attachment
    Dim otaAttachmentList 'As TDAPIOLELib.List
    Dim otaAttachmentFilter 'As TDAPIOLELib.TDFilter
    Dim otaTreeManager 'As TDAPIOLELib.TreeManager
    Dim otaSysTreeNode 'As TDAPIOLELib.SysTreeNode
    Dim otaExtendedStorage 'As TDAPIOLELib.TreeManager

    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")

    Dim strPath 'As String

    Set otaTreeManager = QCUtil.TDConnection.TreeManager
    Set otaSysTreeNode = otaTreeManager.NodeByPath(TDFolderPath)
    Set otaAttachmentFactory = otaSysTreeNode.Attachments
    Set otaAttachmentFilter = otaAttachmentFactory.Filter
    otaAttachmentFilter.Filter("CR_REFERENCE") = "'ALL_LISTS_" & otaSysTreeNode.NodeID & _
    "_" & TDAttachmentName & "'"
    Set otaAttachmentList = otaAttachmentFilter.NewList
    If otaAttachmentList.Count > 0 Then
    set otaAttachment = otaAttachmentList.Item(1)
    otaAttachment.Load True, ""
    strPath = otaAttachment.FileName

    if(bMovetoRoot) then
    If (fso.FileExists(otaAttachment.FileName)) Then
    fso.CopyFile strPath, "c:\"&TDAttachmentName
    DownloadAttachment = "c:\"&TDAttachmentName
    DownloadAttachment = strPath
    end if
    DownloadAttachment = strPath
    end if

    Reporter.ReportEvent micFail, "Failure in library function 'GetFolderAttachmentPath'", _
    "Failed to find attachment '" & TDAttachmentName & "' in folder '" & TDFolderPath & "'."
    DowloadAttachment = "Empty"
    End If

    Set otaAttachmentFactory = Nothing
    Set otaAttachment = Nothing
    Set otaAttachmentList = Nothing
    Set otaAttachmentFilter = Nothing
    Set otaTreeManager = Nothing
    Set otaSysTreeNode = Nothing
    Set fso = nothing

    End Function

  4. #4

    Re: Function Call from Recovery using relative path at QC

    yes, this workaround i am thinking off...
    I was also trying to give associated library name but it did not take it with the relative of qualified path..

    well, thanks for the reply.. [img]/images/graemlins/smile.gif[/img]
    Manish Bansal

    Checkout Blog Page At



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:30 PM.

Copyright BetaSoft Inc.