Skip to main content


Featured Post

WebDriver setup with Eclipse IDE for Java

Recent posts

Convert JSON to XML using QTP/UFT/VBScript

Sample Code : Dim strPage,strJSON,objIE strPage = "C:\Jay\JLoader.html" Set objIE = CreateObject("InternetExplorer.Application") objIE.Visible = True objIE.Navigate2 strPage While objIE.Busy : Wend strJSON = "{""FirstName"":""Jay"", ""LastName"":""Krishna""}" Set objWin = objIE.document.parentWindow objWin.execScript "var jsonStr2XML = function(strJSON) { return json2xml(JSON.parse(strJSON));};" Msgbox  oWin.jsonStr2XML(strJSON) objIE.Quit In Detail: Converting The most popular data interchange format JSON(JavaScript Object Notation) to XML using QTP/UFT. Parsing JSON in UFT could be a challenge so we will use JavaScript in UFT to make it perfect. SO We need :              Java Script API  - To Convert JSON to XML                         JavaScript Files :               

Jenkins Integration with HP QTP/UFT & HP QC/ALM

Over – View: ü   HP QTP/UFT should be integrated with HP QC/ALM. ü   Jenkins should be configured. ü   Install Jenkins HP Application Automation Tools Plugin ü   Create a Build & Run How to Configure HP Application Automation Tools   Plugin : §   Goto Jenkins Home Page navigate to “ Manage Jenkins ” -> “ Manage Plugins ” §   Search for HP Application Automation Tools plugin and install. §   Restart the Jenkins with adding “restart” as URL parameter like “http://servername:8080/restart” §   Now Goto Jenkins - > Mange Jenkins - > Manage System                 §   Fill the HP QC/ALM Details and Save. §   Now Navigate back To Jenkins Home page and Click on New Item. §   Select type as Freestyle project and enter the Build Name . §   Fill the required details and select Build Triggers  as  Build periodically and specify the schedule. §   Select Add Build Step as “ Execute HP functional tests from HP ALM”   §   Select ALM Server

Intro to CI (Continuous integration) - Jenkins

                                 Continuous integration is a process to integrate development work and Testing to identify the development errors as early as possible to achieve rapid application delivery throughout the software application lifecycle.  The Jenkins Over-View:                                          Jenkins is one open source tool to perform continuous integration. The basic functionality of Jenkins is to execute a predefined list of steps based on a certain trigger. For example the trigger might be a time based trigger or conditional trigger or etc.                              Builds can be started by various means, including being triggered by commit in a version control system, by scheduling via a cron-like  mechanism, by building when other builds have completed, and by requesting a specific build URL. Eg - execute build every 30 minutes. The basic list of steps: perform a software build with Apache Maven or Gradle Run a shell sc

Send Mail uisng Outlook with Vb Script or QTP/UFT

strToaddress  =   "; " strSubject  =   "Sample-Subject" strBody  =   "Sample-Body" strAttachPath  =   "C:\Dump\Sample.txt" SendMailFromOutlook strToaddress,strSubject,strBody,strAttachPath Function  SendMailFromOutlook ( strToaddress,strSubject,strBody,strAttachPath )        Dim  objOut, Objmail        Set  objOut  =   CreateObject ( "Outlook.Application" )        Set  Objmail  =  objOut.CreateItem ( 0 )                   With  Objmail         . To   =  strToaddress         .Subject  =  strSubject         .Body  =  strBody          If  strAttachPath  <>   ""   Then                                .Attachments.Add ( strAttachPath )          End   If         .Save         .Send        End   With             'Clear the memory        Set  objOut  =   Nothing        Set  Objmail  =   Nothing End   Function Note : Mail will be sent from your Local Co

ZipFiles/Folders Using VB Script in QTP/UFT

Sample:  strmyFolderPath = "C:\Jay\Sample" strZipFilePath  = " C:\Jay\My SampleFile.Zip" Call  ZipMyFolder (  strmyFolderPath, strZipFilePath  ) Function  ZipMyFolder (  strmyFolderPath, strZipFilePath  )      Dim  intSkipped, intSrcItems      Dim  objApp, objFolder, objFSO, objItem, objTxt      Dim  strSkipped      Const  ForWriting  =   2     intSkipped  =   0      ' Make sure the path ends with a backslash      If   Right (  strmyFolderPath,  1   )   <>   "\"   Then         strmyFolderPath  =  strmyFolderPath  &   "\"      End   If      ' Use custom error handling      On   Error   Resume   Next      ' Create an empty ZIP file      Set  objFSO  =   CreateObject (   "Scripting.FileSystemObject"   )      Set  objTxt  =  objFSO.OpenTextFile (  strZipFilePath, ForWriting,  True   )     objTxt. Write   "PK"   &   Chr ( 5 )   &   Chr ( 6 )   &   String (   18 ,  Chr (