Skip to main content

Posts

Showing posts from 2013

Triggering Web Services Using QTP

                      Triggering Web Services Using QTP   'Web Service url sWebserviceURL=  "http://sample.wsdl" 'Input file InputRequest = "C:\Jay\Input.txt" 'response or output file sOutputXML= "C:\Jay\Output.txt" 'Fso Object Set fso = CreateObject("Scripting.FileSystemObject") 'read the input file Set f = fso.OpenTextFile(InputRequest,1) sInFileContent =   f.ReadAll f.close 'xml object Set http = CreateObject("MSXML2.ServerXMLHTTP.3.0") 'open the connection http.open "POST", sWebserviceURL,False http.setRequestHeader "content-type","text/xml" 'Send the input file http.send sInFileContent 'read the response OutputResponse=http.ResponseText 'write into output file Set f = fso.OpenTextFile(sOutputXML , 2, True) f.Write(OutputResponse) f.close set f= nothing set fso=nothing

Create DSN using VB Script in ODBC

    'Create the Filesystem Object     Const SystemFolder= 1     Set oFso = CreateObject("Scripting.FileSystemObject")     Set SysFolder =oFso.GetSpecialFolder(SystemFolder)     SysFolderPath= SysFolder.Path     'Set the Driver details     DriverPath = SysFolderPath & "\sqora32.dll"     DriverName = "Oracle in Oraclient11g_home4"     'get the required details     DataSourceName = "Sample Source Name"     DatabaseName = "DB Name"     sDescription = "Odbc Desc " & DatabaseName        tnsNames = "Tns Names"     userId  = "User name"             'Create Shell Object     Set WshShell = CreateObject("WScript.Shell")     'Set the Key in the register of DSN        RegEdPath= "HKLM\SOFTWARE\ODBC\ODBC.INI\" & DataSourceName & "\"     'We recorded     WshShell.RegWrite  RegEdPath  , ""         'We put the val

Working with BLOB or CLOB Objects in QTP

The below Code will Insert the CLOB or BLOB objects in  Oracle DB using QTP. Sample Code: 'CLOB or BLOB file Path strClobFileName = "C:\Jay\SampleInputs\BLOBorCLOB.txt" 'Connection String strOracleConnectionString =  "Driver= {Microsoft ODBC for Oracle}; " &_                   "ConnectString=(DESCRIPTION=" &_                   "(ADDRESS=(PROTOCOL=TCP)" &_                   "(HOST=hostName) (PORT=1234))" &_                   "(CONNECT_DATA=(SERVICE_NAME=ABCD)));uid=userName; pwd=Password;" 'Create Required Objects Set objCon = CreateObject("Adodb.Connection") Set objRs = CreateObject("Adodb.Recordset") Set objCom = CreateObject("Adodb.Command") Set objStream = CreateObject("ADODB.Stream") 'Set the CursorLocation to Get the Record Count properly objCon.CursorLocation = 3 'Open the Connection objCon.Open strOracleConnectionString 'Set the required

Getting Record Count Using ADODB Connection in QTP

When you get the Record Count as  -1 Change the CursorLocation to 3 or 2 or 1(mostly 3 ll work) Sample Code:  strConnectionString =  "Driver= {Microsoft ODBC for Oracle}; " &_                   "ConnectString=(DESCRIPTION=" &_                   "(ADDRESS=(PROTOCOL=TCP)" &_                   "(HOST=hostName) (PORT=1234))" &_                   "(CONNECT_DATA=(SERVICE_NAME=ABCD)));uid=userName; pwd=Password;" strQuery = "Select * From Table" Set objCon = CreateObject("Adodb.Connection") objCon.CursorLocation = 3 Set objRs = CreateObject("Adodb.Recordset")  objCon.Open strConnectionString Set objRs = objCon.Execute strQuery Print objRs.RecordCount

HP Unified Functional Testing(UFT) 11.5

HP has launched  the latest version of QuickTest Professional (QTP). This new version of QTP is called HP Unified Functional Testing (UFT) 11.5 . Below is the sneak preview of some of the important new features that will be available in UFT 11.5 1) What is UFT 11.5? The new version of HP QTP is being called HP Unified Functional Testing 11.5 (UFT 11.5). UFT 11.5 is actually a combination of HP QTP (for testing GUI) and HP Service Test (for testing API). 2) Brand New Modern IDE This point has been discussed so many times at many forums. QTP’s IDE lacked the punch when compared to many modern IDE’s like Eclipse, Microsoft Visual Studio etc. It lacked many must have features that were there in many IDEs available in the market. With UFT 11.5, HP will be introducing a brand new modern IDE, which will a) have a new IDE aligned with modern dev IDEs (like Eclipse). b) have many new features such as script editing, coding, MDI, checkpoints, auto completion etc Image Cou