Posts

Solution to "this test is locked by another quality center user"

Image
There are a lot of instances while working with Quality center that you might have noticed this message "this test is locked by another quality center user” Sometimes you may have imposed a self lock on it.. J This happens mostly when the user kills the QTP process when the script is still open(from QC). If you have forgotten the machine where you have imposed a self lock then don’t worry as here is the soln to get rid of the same: Copy the following code and run it from the machine were qc is instantiated. On Error Resume Next     desc = "Please provide the network id for the user, and please make sure" &_         "this user is logged out prior to removing locks"    UName = InputBox(desc,"Provide network id")   If(UName <> "") Then        Set cmd = TDConnection.Command         cmd.CommandText = "DELETE FROM Locks WHERE LK_USER ...

Maximize browser using QTP and IE8 / IE7 / Firefox

Image
Problem : Maximize a tabbed browser (ie7/ie8/firefox) Solution1:  hwnd=Browser("name:=myBrowser").getROProperty("hwnd")                Window("hwnd:="&hwnd").Maximize Disadvantage:  Does not work with tabbed browsers consistently Solution2: hwnd=Browser("name:=myBrowser").Object.HWND               Set objWindow=Window("hwnd:="&hwnd2)               objWindow.Maximize Disadvantage:  Does not work with tabbed browsers when there are multiple browsers open   Solution3: SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe",URL,"C:\","open","3" The "3" at the end Activates and Maximizes the window. Disadvantage:  Does not work when the browser is already open   Solution4: Set WshShell = CreateObject("WScript.Shell") ...

Why do we need to launch the application under test (AUT) after QTP is launched?

Image
Have you ever wondered why do we need to launch the application under test (AUT) after QTP is launched? When I started learning QTP I asked the same question to the trainer and he said he would get back on it, after some research i found the answer to my question , sharing here what i learnt ( few years back ) and found ( recently ) : QTP interacts with test applications using windows hooks. A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure. Therefore these hooks help QTP during recording and identifying objects Hooks can only be installed using DLLs These Hooks can be injected only during runtime when QTP is brought up. An interesting example from Tarun here  : "Hooks are basically interceptors in system". This example will clear it User Clicks -> Windows OS determi...

Ten best Open Source Bug Tracking Systems and thier Comparison

Image
In continuation to the prev post on " Ten Best Tools for Test Automation " read another interesting link ( toolsjournal ) on what are the ten best open source bug tracking systems, so here is the list in no particular order: Bugzilla Mantis BT   Trac Redmine OTRS [Open-source Ticket Request System] Request Tracker Eventum BugGenie WebIssues Fossil Click on the links to get more info on any of the tools. Happy Testing! And if you want a comparison on the tools features here is an excellent link

Last friday's date using VbScript

Image
Some vbscript to get the previous week's date, modify the code and you can do a lot of fun things with the same: 'Gets the last friday's date  strCurrentSysDate = Date  strModDate = dateadd("ww",-1,strCurrentSysDate)  numWeekDay = 6- weekday(strModDate)  strModifiedDate = dateadd("d",numWeekDay,strModDate)  strmonth =left(monthname(month(strModifiedDate)),3)  If len(cstr(day(strModifiedDate))) < 2 Then   strDate = "0"&day(strModifiedDate)  else   strDate = day(strModifiedDate)  End If  strYear = year(strModifiedDate)  strPrevDate =  strmonth& "/" & strDate & "/" & strYear Msgbox strPrevDate