Working with Remote Agent in UFT

Let us comprehend the role and settings of a “Remote Agent” in UFT/QTP.

Meaning:-
It is an inbuilt tool inside HPUFT, which comes into picture when we run a test from ALM.

UFT Remote Agent opens on the UFT computer where the test runs.

The UFT Remote Agent determines how UFT behaves when a test is run by a remote application such as ALM.

Launching:-
Automatic: – It will be automatically triggered on the machine (UFT Machine) where we are running our tests from ALM/QC.

Manual: –
1. Look for the Unified Functional Testing (installation) folder ->bin->AQTRmtAgent.exe. Launch this .exe file.

AQTRmtAgent


2.Invoke the Remote Agent by following the path, Start > All Programs > HP Software > HP Unified Functional Testing > Tools > Remote Agent


Launching RemoteAgent in UFT

Settings in Remote Agent

Counting File types inside a Folder structure.

Continuing with working with Files and Folders.

Files
Files inside a Folder 


Requirement2:-

How to get count of particular file type inside a Folder.
'Function Call 
fn_FilesInFolder "C:UsersufthelpDocumentsPerso","pdf"
'*******************************************Sub*******************************
'Function Name:- fn_FilesInFolder
'Function Description:- Function finds number of particular files inside a Given folder
'Input Parameters:- Folder Path,File Type
'Output Parameters:- None
'*****************************************************************************
Public Function fn_FilesInFolder(sPath,sFileType)
Dim iFiles:iFiles = 0
Dim iCount:iCount = 0
'Creating a object to work with Files
Set objFSO = Createobject("Scripting.FileSystemObject")
'Creating a object to work with folders inside a given Folder Path
Set objFolders = objFSO.GetFolder(sPath)
'Creating a object to work with Files
Set objFiles = objFolders.Files
'Taking count of files Inside a particular folder path
For Each sFiles in objFiles
'Getting the Extension of the file
sExtn = objFSO.GetExtensionName(sFiles.Name)
'Comparing the Extension
If Ucase(sExtn) = Ucase(Trim(sFileType)) Then
iCount = iCount + 1
End If
Next
msgbox "Folder = '"&sPath &"' contains '"& iCount &"' number of files with the extension of '"&sFileType&"'"
End Function

Image courtesy of hywards / FreeDigitalPhotos.net