Posts

Showing posts with the label QTP

LeanFT = QTP/UFT + Continuous Integration + Agile + Opensource in the HP world

Image
Can you believe that HP has come up with this new tool/plugins that they call LeanFT, obviously the name suggests that it's the lean way of doing functional testing. Let's see what they claim: Key Highlights and what's good: Automation in Java or C# - definitely something that most automation folks were looking forward to Compatible with UFT's object Identification engine- hmm :) Continuous Integration - Has integration with Jenkins  Supports BDD tools like Cucumber/Jbehave Integration with SCM tools like Git/SVN IDE would be your standard Eclipse / TFS Same reporting as before but with all of the above Unit testing frameworks like JUnit/ Nunit Integration with other HP tools -  HP Application Lifecycle Management, HP Quality Center, and HP Mobile Center. Interesting fun facts: QTP's Object spy from Visual studio/Eclipse Free license if you already have the UFT 12.5 license customized html reports Release Date: July 2015 along with  UFT ...

Naming Conventions for Object / Locator Repository / Properties File

Image
I guess there is no real need for me to emphasize why is it that we need to make our Object / Locator repository clean. Whatever you call the OR: Object map Simple Properties file Object Repository Name Mapping file Or any other file that stores your objects The reason you want them to be clean: Vastly reduce the amount of time needed for script Script maintenance in case object properties change Sophisticated Object identification and management In the context of Selenium WebDriver, there is no out-of-the box solution for Object identification and repository. This furthermore increases the relevance and importance of a good way of managing things. In an Agile based project, you can add object place holders so that as development is happening, even automation can begin in parallel. Identify objects in the Object Repository that are no longer available in the AUT Easy navigation when the size of the Object Repository grows exponentiall #---------------------...

Testing Job Market in Australia

Image
Since I have been in Melbourne for a while now and mostly I get the same questions about what's the job market in Australia like? Here are my few cents: The job market is improving for software testers and quality engineers; however, the skills and experience needed to get hired have changed.  It is more common, at least where I'm geographically located, to see companies hiring testers with specialized skills like automation/performance/security (Not that manual testers are not needed but the ratio of jobs are lesser) People ask for local experience but if you are good there is no one stopping you from getting the first break There are two major domains to look out for here: Finance and Betting (Doesn't matter what you get into they have many similarities when it comes to testing and automation) I can advice people with automation skills that if you are relying only on the next three alphabets here : QTP then you better add more opensource tools like Selenium...

QTP + BDD = Wow!

Image
I read this post recently and was happy to see someone actually tried using QTP with BDD. Definitely worth a share on my blog: http://unmesh.me/2012/10/18/implementing-bdd-with-qtp-rough-cuts/

How to change QTP / UFT Insight image during execution?

Image
If you have started using UFT then I am sure you would have at-least given this feature a try: UFT Insight = Image based identification  Mandatory /assistive/smart identification does not work in Insight Ordinal /Visual relation identifier do Insight objects contain the image either internally (when created during record or learn) or by supplying an image using the ImgSrc property Descriptive programming: InsightObject("ImgSrc:=C:\Image.jpg").Click InsightObject("ImgSrc:=C:\Image.jpg").Click SetTOProperty: InsightObject.SetTOProperty "ImgSrc", "C:\Image.jpg" InsightObject.Click Options for Insight Object are at Tools>Options>GUI Testing>Insight. This pane enables you to define options that customize how UFT handles Insight test objects Hope you got enough insight, Happy Testing!

QTP 11.5 -> UFT

Image
It's been sometime now that I have blogged. Too many projects and automation tools giving a good start to my 2014. Back to the original topic of what's in it for me with UFT? If you really do not want to  RTFM here you go: Here is what HP had to say way back in 2012/early 2013: "It's time to bring much awaited HP Unified Functional Testing 11.5 (QTP + Service Test = UFT) has been released today (Dec 06, 2012) at HP Discover 2012 event"   As you would have guessed it the new version of HP QTP which 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 - Vbscript) and HP Service Test (for testing API/web services - C#). New modern unified IDE aligned with modern IDEs (like Eclipse) / have many new features such as script editing, coding, MDI, checkpoints, auto completion etc  Image Based Automation – Using HP UFT Insight  (Not very successful but is a good last resort) Integrat...

How can I run QTP test without manually launching the tool

Image
    Here is a simple Vb-script that will do the following:   Check if the test exists Launch QTP and Open the test Make QTP run in the minimized mode R un the test a nd save the results Close QTP    testResourcePath = "C:\TestResults\" testPath = "C:\TestPath\"       'Determining that the test does exist Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") DoesFolderExist = objFSO.FolderExists(testPath) Set objFSO = Nothing If DoesFolderExist Then Dim qtApp 'Declare the Application object variable Dim qtTest 'Declare a Test object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = True   qtApp.WindowState = "Minimized" qtApp.Open testPath, False 'Open the test in read-only mode Set qtTest = qtApp.Test 'Set qtResultsOpt = CreateObject("QuickTest.RunRes...

MongoDB and QTP

Image
Problem: Tried connecting QTP with MongoDB [No SQL database]? You can connect to MongoDB using .net/java languages since there are drivers for it. In QTP (VBScript) you can then call those drivers.  You can create a java jar which exposes methods like connect, execute, disconnect etc on MongoDB and call them from vbscript. Solution:   1. Get a Code snippet in Java where it connects with Mongo DB,Insert/Select/Update..etc 2. Run the below code which will then give the result in a file. Systemutil.Run "cmd.exe" Window("object class:=ConsoleWindowClass").Maximize window("object class:=ConsoleWindowClass").Type "cd\Test Result" window("object class:=ConsoleWindowClass").Type micReturn window("object class:=ConsoleWindowClass").Type "java -classpath C:\Users\Ady\Desktop\QTPMongo\bin;C:\Users\Ady\Desktop\QTPMongo\lib\mongo-2.10.1.jar com.jpmc.cfp.mongo.MongoSearchMain> output.xls" We can custo...

Tips.txt on your machine?

Image
Did you know that there was a tips.txt file on your machine where QTP is installed? Navigate to the QTP installation folder Further navigate to the “dat” folder Look for a file with the name “Tips.txt” Open this file in a text editor and enjoy tips provided by the developers themselves  Happy Testing!

SAP TAO and QTP

Image
What is SAP TAO? SAP TAO is an automation testing tool released by SAP in integration with focus-frame. TAO (Test Optimization and Acceleration) is designed for SAP GUI based applications integrated with SOLMAN (Solution Manager) and HPQC SOLMAN Provides the necessary tools around the Implementation, Operational and Optimization aspects of your SAP Application life cycle. The two add-ins that are mandatory for TAO to be functional are "SAP" and "Web". Where does QTP fit in?   Pros SAP TAO wraps up QTP and QC and QTP acts as execution engine, test scenarios are created and driven from QC through business components.  SAP TAO helps in automatic generation of test components for end to end scenarios.   Cons  QTP and SAP TAO are really good when it comes to automation the  only challenge is  installation. installation process consisting of four areas Quality Center – This will host Quality Center software, patches, add-ins and S...

Quick Dirty Disposable automation

Image
Here are some interesting things that I have tried recently changing the way automation is done traditionally. What to automate? The most difficult question though it sounds pretty straight forward If you already have manual tests have your battle is won If not run through the most used features / easily broken  Take leads from the sitemaps / access logs / Roles / analytics and access statistics Start automating? Biggest challenge is always maintenance , categorise tests into essential features and generic What we also categorise tests into are " will there be an upgrade or not?" - so we have two sets quick dirty disposable tests and well designed unbreakable tests. Everything flows from QDD to WDU tests The first script is always a bootstrap script that will have the initialization parameters in place By now you would have realised this is an unorthodox way and might be debatable with some test automation experts, the reason being we are ignoring the rule...

Object Identification issues with Reflection Sessions

Image
If you are using QTP and Reflection sessions for the first time What you will notice: Whenever you open Reflection Sessions using QTP, it stops recognizing the objects viz. TEWindow, TEScreen etc. But when we open Reflection Sessions manually and then spy, QTP recognizes objects correctly What can be done to avoide this issue: We open reflection before launching QTP (yes thats an exception) To connect/disconnect the reflection session you can use below statements: Set objReflection = GetObject("H:\Sessions\REF2011-PersonalCommunicationsIcons\TSYS.rd3x") ‘the path will change as per your scenario objReflection.Connected = 0 objReflection.Connected = 1 Additionally we keep only one session open in reflection window Happy Testing!

HP ALM Client logger / Log Manager

Image
I am not sure how many of you know about this feature. This one without doubt helps when we have no clue what is wrong with QTP/QC HP ALM Client logger /log manager You can either get it from here https://hpln.hp.com/content/hp-alm-client-log-manager-alm-1100-and-later Switch it on from here: Navigate to C:\Program Files (x86)\HP\QuickTest Professional\bin\ClientLogs.exe or C:\Program Files (x86)\HP\Unified Functional Testing\bin\ClientLogs.exe Once you have run the logger , find the logs at C:\Users\ \AppData\Local\Temp\

QTP closing after every run from ALM / QC11

Image
Problem: If you are using ALM or have just upgraded from QC10 , you will notice that QTP keeps killing itself after the run has finished. You will have to launch QTP to make any changes to the script! Solution: When QTP is launched from QC /ALM it first creates the "Remote Agent" (that can be the seen in the system tray) Right Click on the "Remote agent" icon and choose settings. In the "Remote Agent Settings" Dialog box , Select the "Keep Quick Test open after a Test Lab run session ends" Click OK You are all set!!!

ALM and BPTWrapperTest

Image
Problem : Unable to run a few tests in ALM 11 that were executing before the upgrade Solution : The reason is named “BPTWrapperTest” that takes a BPT test - downloads all its components - and generates a single QTP “BPT Wrapper” test to run. Why? : BPT performance issues that were seen in QC10. Issues:  Mostly data related tests break when running BPT in ALM11. Workaround: Disable this feature from the System Registry and modify the registry key value of UseBPTWrapperTest to ‘N’. Here is the path of the registry key in Windows 7/ iSpace: Win 7/ iSpace == HKEY_LOCAL_MACHINE >> SOFTWARE >> Wow6432Node >> Mercury Interactive >> Test Director >> BPT >> UseBPTWrapperTest Dont like the workaround?: Change Environment(“TestName”) to Environment(“ActionName”) DataTable.Value(“test”) to DataTable.Value(“test”, Enviroment(“ActionName”)) Tip: The only reason you are not able to not find th...

QTP incompatible with Eclipse or any similar Java Application

Image
There are more than a few reasons that you want both QTP and eclipse on your machine. REASON: This is an issue with QTP, which adds some Java hooks globally, this breaks Eclipse at start time. Removing these will break QTP When QTP is installed it creates/modifies several environment variables that Java applications use. The setting for these values that are needed for QTP may cause problems for other Java applications, such as Eclipse. There are scenarios where QuickTest Professional (QTP) java support environment variables (_JAVA_OPTIONS, JAVA_TOOL_OPTIONS, IBM_JAVA_OPTIONS, _classload_hook) prevent specific applications from launching or functioning properly. SOLUTION: There are some suggested workarounds from HP in the following support doc: ( http://support.openview.hp.com/selfsolve/document/KM834284 ). Suggestion three is worth trying and does not require updating HKLM registry. These suggestions will allow to work around this situation even with the QTP ja...

Beyond Compare with QTP/VBScript

Image
Scooter's software Beyond Compare  with QTP /VBScript: Public WorkingFolder = "C:\Test" Public BeyondComparePath = "C:\Program Files\BC3\Beyond Compare 3\BCompare.exe" Public Function CompareFiles(LeftFile, RightFile, ReportName, ComparisonType)          CreateBeyondCompareScript          Set oShell = CreateObject("Wscript.Shell")          'Select Different Comparasion Type Script          If LCase(ComparisonType) = "text" Then                   BeyondCompareScriptPath = WorkingFolder & "BC_Text.txt"          Else                   BeyondCompareScriptPath = WorkingFolder & "...

QTP or Selenium / QTP v/s Selenium

Automation Tool QTP Selenium WebDriver License Cost $9000 for each floating license or $6000 for a node-lock license Open Source What can be tested? Most windows applications and Web Applications Only Web Other tools required Quality Center for test management Mostly needs tools like TestNG/Fitnesse/Development tools/Reporting tools and so on Language VBScript Java/.NET/PHP/Perl strict programming rules unlike the loose scripting in vbscript Windows Compatible Only Windows Windows/MAC/UNIX Platforms Android Compatible N Y Tester Friendly Y N Companies Larger firms who can afford the tool Smaller Firms and a few larger ones Learning Required Minimal Loads of tools and Programming skills for JAVA/.NET Platforms Not very easy when it comes to multiple OS /Browsers selenium grid with a 3rd party grid service like Saucelabs Books Many Few good ones for Java and .NET Open Source Frameworks Y Just One Agile Friendly Y Y What Customers have to say? Most Popular test automation ...

Configure QTP and Firefox 10.0.3

Image
Steps: Un-install any previous instances of Firefox Install Firefox 10.0.3 by opening the file "WX7-FireFoxESR-10-0-3-R1.EXE" in "Run as Admin" mode Restart the system Install the QTP Patches in the following sequence: QTPWEB_00090.EXE QTPWEB_00092.EXE Info about insalled Patches would be available at: C:\Program Files (x86)\HP\QuickTest Professional\HotfixReadmes

Screenshots on VM with QTP

Image
I am sure a lot of you have noticed that taking screenshots on a VM will result in a blank screen :) The solution is that the machine should not be locked while running your scripts , similar to a solution provided in my earlier posts.If you missed that out here is the code: Content of vbs File (keykaker): ' Keyboard activity faker Set shell = WScript.CreateObject("WScript.Shell") Set args = WScript.Arguments interval = 180 key = "+" output = True ' If running under WScript were not in a console so disable any output If InStr(LCase(WScript.FullName), "wscript") > 0 Then output = False ' Handle the arguments If args.Count > 0 Then temp = args.Item(0) If Not IsNumeric(temp) Then WScript.Echo "Interval must be numeric" WScript.Quit 1 ElseIf temp < 1 Then WScript.Echo "Interval must be greater or equal to 1" WScript.Quit 1 Else interval = temp End If End If If args.Count = 2 Then key =...