Skip to main content

Posts

Showing posts from 2010

The Nanny

Have been watching Nanny and yet again it is as engaging as it was when I first watched it about 9 years ago. I can never get enough of Fran's honest concerns with kids especially Maggie. How Fran salvages her from situation which Fran herself experiences in past. I see CC as one of most downplayed character of show. Though she is portrayed chesty woman looking down upon at Niles and Fran, but they are equally responsible for making her hate them; be it Niles constantly lampooning her or Fran getting in the way of CC and Maxwell. Fran's granny Yetta, is another favorite of mine. She is the oldest person in the show but carries more warmth than any one else. And then there is Gracie, who is always protected by Fran (and so as the others kids in family). I dare say, The Nanny has potential to be as famous as Friends; just needs a better publicity. p.s. got to know about nanny reunion should download soon.

XPath and single quotes

I had tough time dealing with XPath and single quote. Though W3C recommends using ' to escape it but I never got it working, let me know if any of you get through. Came across this blog and found that “concat” could be used in this situation. So original XPath expression is – //meta[@name=’DESCRIPTION’][@content=’Tester’s Test’] This is some thing which certainly fails as single quote in “Tester’s” marks it at end of string and then XPath blows up, next trial was – //meta[@name=’DESCRIPTION’][@content=’Tester''s Test’] This does not work despite w3c recommendation! And then I used concat function and split the string as – concat(‘Tester’,”’”,’s Test’) NOTICE that single quote is kept in double quote while other characters are kept in single quotes. So XPath looks as – //meta[@name=’DESCRIPTION’][@content=concat(‘Tester’,”’”,’s Test’)] And this works charm.

Bye Bye Ciber

Today was my last day at Ciber and I can not stop but blog about my experiences at Ciber/Iteamic. Looks like it was yesterday (13th Feb 2006) when I stepped in to Iteamic with three new joiners - Janakiram, Shamial and (well I don't remember third name). Happened to begin work with Emergent which turned out to be biggest testing team in Iteamic and found my first team lead Bindu who, well how much ever I admire would be less. A team lead who knows how to nurture new joiners. Made friends like Poornima, Shilpa (Chatter Box), Aarati (who was always ready to help with no strings attached) and Rekha (who made me understand req which other wise were Greek to me). By now I realized that I have strange habit of naming people on how I perceive them. After three months I found my self associated with Anian and got to meet Mallikarjuna (My second team lead). Mallikarjuna has been most hard working team lead I have worked with, hard working to the extent that it intimidates me! I would find

Test Automation Recovery Scenarios: how much recovery

This article is not specific to QTP but elaborates a more general problem with functional test automation. I caught the fancy of recovery scenarios when came across such feature in QTP. QTP's motive is to recover from problems of unexpected pop up windows (though concept itself is contradictory and requires you to know object properties of unknown window in advance!) .Though soon realized that it is more of marketing gimmick than of being of much importance to automation it self. Some thing which always puzzled me was how much of such scenarios to use. While under going In house QTP training we were told to even check presence of objects before exercising them. This is to make sure that QTP does not throw any pop up error during test case execution. (at least this is what we were told during training). Later I realized that using QTP properties could be to order QTP do what is intended (though in a limited manner). This idea of checking every object before test freaked me out. I

"Loading......." the contents

Came across a testing blog yesterday and started browsing all past blogs of it using calendar. Look like my network is slow and I got to see "Loading...." message after clicking on calendar link. I collapsed the link and clicked on calendar again and got to see "Loading....... Loading.......". Each collapse and expansion of calendar increases the message "Loading......."  by count one. After a few clicks After a few more clicks

So why did you write "this" certificate?

This is going to be an eternal post which I would modify as and when I find new reasons for writing certificates. Though I personally don't admire certificates but happened to write one (QC 9.2) on my own. This happened last year when I was told about a project which needed experience on QC and client had asked have QC certified resource working on it. Well exam was really easy and I happen to clear it. Irony is project never materialized and I never got to work on QC. Happened to mention about certification on my resume and under the influence of this group removed it. Of late I have been interviewing testing candidates and a few of them have certification batch with them. And we all know most famous certification batch in market is ISTQB (I must appreciate their marketing for sure and hope they contribute a share of their earnings to some open source testing projects. Though I am not very hopeful of this.). I am listing here the responses I receive from the candidates - O

So how do you Strategize it?

Happened to read Pradeep's blog today and got enthusiastic to write a blog. Found there is a intricate situation for me to blog about, and almost all of us would have faced it some time. Of late I was called by one of the engagement manager to help one tester (the lone warrior and new joinee to organization) in project to help him on test strategy. Had a meeting in the after noon with project team and got to know that team has least information on project (assignment had begun a week ago). Project is a migration task from one java technology to other and testing activities would involve function testing (with no definition of scope) followed by performance testing. Team is bewildered as they have least information about project whereabouts and the tester has no idea on how he would carry out functional and performance testing. On top of this the very first deliverable for the project is test strategy document. So our warrior has been asked to come up with test strategy. And he

Hacking Website from Google

If u have not yet seen this! Google labs is offering a sample application with security vulnerabilities. I have just started browsing through and its very interesting. More interesting for some one who is new to Security Testing. Website is available here and open to all for hacking with tips and tricks provided by none other than Google itself.

Defect in Word 2007

This is my first post for tag "Universal Defects", though I had other similar posts but I never tagged them (must do that now). Well I have been using word 2007 on my Dell Studio 15 lap top.Under "Mailings" tab there is an option called ''Select Recipients". Click on this and select option "Select from Outlook Contact ", and I see the following error - and this is the error - I don't have look configured on my laptop. Microsoft, are u listening!!!!!!!!!!!

That's not test automation framework!!!

I have been flabbergasted by the amount of misinformation test automation engineers have. Many of my colleagues use QTP or Test Complete and believe that they have developed a test automation framework. Using a tool or creating directory structure for test automation is not equivalent to creation of test automation framework, in fact not at all. Moreover Indian software industry is so fascinated with word "framework" that this question keeps popping - "Did u design any framework", I wonder if every software test project needs a customized framework, and if so then I am not that so expert that keep designing framework for each and every project!!!

Review of Selenium Book

Not long time ago when I participated in Selenium Documentation and contributed for Selenium Remote Control. I have got one more offer to review an upcoming Selenium book by David Burn. I have never interacted David in person but looks to me he is as passionate about Selenium as I am. I had never imagined that I would get opportunities to review a book in my life, any ways. So far I have reviewed 3 chapters. I must accept that during review I came across Selenium facts which I my self was not aware and I must thank David for this. I hope the book gets finished soon and made available to Open Source community.

Generating Dates in java

This is a small posts which helps in generating custom dates in java. It would be helpful in data generation in Selenium. package com.core; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; public class DateClass { private static String currentDate; private static String futureDate; public static void main(String[] args) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy hh:mm"); Calendar cal = new GregorianCalendar(); currentDate = sdf.format(cal.getTime()); // Current date System.out.println(cal.getTime()); // Formatted current date System.out.println("Formatted Date is: " +currentDate); cal.add(Calendar.DATE, 1); futureDate = sdf.format(cal.getTime()); // Formatted future Date System.out.println("Future Date is: " +futureDate); } }

Why I quit Figurine fitness

I had it on my mind from long though never penned it. This post is dedicated to all those work out freaks that are befooled by their trainer in to buying costly food supplement specifically at higher price then what is available in market. In this post I am not being critical of gym but I question all those trainers who forget their profession and mint money by fooling their clients. Same happened with me and I have no qualms accepting it, I am rather glad that I realized it and moved out from gym. It started in month of Jan 2009 when I joined Figurine fitness located in Jaynagar (as I said earlier I have nothing against gym in fact they have some of the most proficient and hard working trainers I have seen, but it’s because of my trainer I developed antipathy against gym!). Inception of gymming was great. I was allocated a trainer who would teach me when to do what. After a couple of weeks my trainer asked me to start taking supplements as I needed extra protein to build up mus

How developers view testers

This is my first cartoon inspired by Cartoon Tester , hope you enjoy it.

Mobile Theft in BMTC buses

  Well, this is some thing I had heard of and was not expecting to experience. I bought a brand new Nokia 5800 about 6 months ago and have fallen Victim of petty thieves in BMTC buses. I got in to a non Volvo bus near Jayadeva flyover to head to Dairy Circle, IBC Park. This is a mere distance of 2 km or so. Bus was not very crowded and I was standing near front door as my destination was not very far. I noticed a couple of guys who were also standing near me and I assumed that probably they also want to get down near by. As soon as bus started one guy came behind me while two more guys quickly moved near closed bus door. One guy in white shirt was standing next to me. The guy who was behind me came forward and now there were three guys near closed door. Bus stopped on next station and none of them got down nor were they willing to move and give space to incoming passengers. Then was the next stop where I had to get down (and all this while I did not have an iota of impressi

Working With FCK editors

I had troubles working with FCK editors using QTP. As these editors are recorded as “WebElement” it is not possible to perform “Set” operation on them I came across two posts which talk about dealing with this issue,   One is of Tarun’s where in talks about using “object” as well as “DeviceReplay” methods which could be used to simulate control on FCK editor He suggests not using “object” for browsers other than IE as it is supported only in IE     Browser ( " testB " ). Page ( " testP " ). Frame ( "Frame" ). WebElement ( " WebElement " ). object . innerText = " Text ” Browser ( " testB " ). Page ( " testP " ). Frame ( "Frame" ). WebElement ( " WebElement " ). object . innerHTML = "<h1> T ext</h1> ”     While other method uses object “DeviceReply” object to exercise object on which control is brought.   ' Click on Application Object Browser ( " testB &qu

Strange QTP Errors and Possible Solutions

Herein I have listed couple of error which I encountered while working with QTP. Some of these are very cryptic and you just can not guess about their Raison d'ĂȘtre. I have listed these errors hoping it would help a new bird. Error while opening Test On Debug Error with Function Error while using a function whose definition was not available in Action Unable to work with IE Unable to recognize IE window; had to restart the browser General Run Error There have been multiple instances of General Run Error with QTP; they just don’t let u know as to what went wrong. On such instance is when I was mistakenly trying to check a check box which was disabled. Instead of General Run Error, there could have been a more comprehensible error like – “object is disabled…”

QTP AOM File

Here in I have got sample AOM file which invokes QTP test. This file also pushes test results to a designated folder. Herein there is no hard coding of path ant where in AOM file - ################################################## Dim qtpApp 'As QuickTest qtpApplication Set qtpApp = CreateObject("QuickTest.Application") Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable qtpApp.Launch qtpApp.Visible = True qtpApp.Test.Settings.Launchers("Web").Active = False qtpApp.Test.Settings.Launchers("Web").CloseOnExit = True qtpApp.Test.Settings.Run.ObjectSyncTimeOut = 240000 qtpApp.Test.Settings.Run.DisableSmartIdentification = True qtpApp.Test.Settings.Run.OnError = "Dialog" qtpApp.Test.Settings.Web.BrowserNavigationTimeout = 60000 qtpApp.Options.Run.RunMode = "Fast" qtpApp.Options.Run.ViewResults = True qtpApp.Options.Run.MovieCaptureForTestResults = "Never" qtpApp.Options.

Reading Outlook Contents From VB Script

There are instances when an application involves mail delivery for certain app features. one way to automated this is to hook with Outlook and read content of mail (though I am not very comfortable with this approach anyways!) #################################### 'Get the Count of Items in Inbox Set app = CreateObject("Outlook.Application") Set nameSpace = app.GetNamespace("MAPI") Set MyFolders = nameSpace.GetDefaultFolder(6) MsgBox MyFolders.Items.Count 'Read unread items in Inbox Set cols = MyFolders.Items For each mail In cols If mail.unread Then MsgBox mail.subject MsgBox mail.sendername MsgBox mail.body mail.unread=false End If Next ####################################

VB Script and ADO DB

VB Script can be used to establish db connection. This is very useful in QTP for writing db test cases. DB connection can be established for both SQL Server Authentication as well as Windows Authentication - ######################################### Function Func_dbConnect On Error Resume Next 'Creating the Connection Object set cn = CreateObject("ADODB.Connection") 'Setting the Data Source strCS = "Driver={SQL Server}; Server=1.1.1.1; Database=GSBREG_021010; UID=us; PWD=us;" 'Open Connection cn.Open strCS If (Err.Number<>0) Then MsgBox("Login Failed") End If Set Func_dbConnect = cn End Function Sub ExecuteSQLQuery Set cn = Func_dbConnect() 'Creating RecordSet Object Set rs = CreateObject("ADODB.recordset") rs.CursorType = 2 'SQL query FetchAcademicLevels = "Select even_id from allocation_event"_

Google Chrome Crashes

Got this error message once while working on Chrome. Only Google can have such uncanny knack for error message

Testing XPath in Firebug

Given the lack of testing hooks in web applications, many a times Selenium Users use XPath to work on UI Objects. So far I used to use Selenium IDE to test XPath in Firefox. I read a blog post here and got to know that Firebug itself can be used to test XPath. This is accomplished using $x function in Firefox. Consider that highlighted text box does not have a constant identifier hence following XPath is to be used > $x("//input[@name='search']") Write this XPath on Console of Firebug and hit enter - Keep mouse pointer on 'input' in console and it would highlight the text box in page. Using Firebug Lite Firebug can be used for other browsers as well and in turn to test XPath on other browsers.......

Working with URL Redirection with VB Scripts

Had chance to work on checking http status VB script. Looks like not all objects work when used URL redirect, so I used "WinHttp.WinHttpRequest.5.1". Set winhttpreq = CreateObject("WinHttp.WinHttpRequest.5.1") 'Initialize HTTP Request winhttpreq.Open "Get", "http://iteamic.com/" 'Send HTTP Request winhttpreq.Send() Print winhttpreq.StatusText Print winhttpreq.ResponseText for now iteamic website redirects to ciber and this code works perfect for it.

VB Script and Square Brackets '[]'

I had tough time working with vb script and square brackets '[]'. Looks like square bracket has special meaning when it comes to regular expression in vb script. I was trying to write DP for check box collection on page as - ****************************************************************************** Browser("name:=.*").Page("title:=.*").WebCheckBox("name:=publishedSectionId[0]").Set "ON" ****************************************************************************** Execution of this line resulted in following error - ****************************************************************************** "Cannot identify the object "[ WebCheckBox ]" (of class WebCheckBox). Verify that this object's properties match an object currently displayed in your application." ****************************************************************************** I wonder if this error makes any sense, any ways problem is with square br

Data Driven Testing with QTP Using Excel ADO

We all are aware of externalizing test data from test scripts in test automation. We often stumble upon using excel as test data file, and I have seen crude ways of handling excel. i.e. - Creating Excel Application object Opening work book and fetching data Disadvantages of this approach are detailed on Microsoft website here - http://support.microsoft.com/kb/278973/EN-US/ In a gist following above mentioned approach would be process heavy and would make script execution (especially in case of long running test suites) slow Another crude way is to use sheet-name (which is still acceptable), Row and Column number (i.e. - (2, 5)), Row and Column range (B5, B10). Using row and column identifier is fragile as insertion of new data set in excel would break existing test scripts. A better approach to overcome these is to use ExcelADO along with name of Range in Excel. ExcelADO overcomes process over head and using Range to overcome fragility over Row and Column Range. In excel an

Execute QTP Tests from AOM file

Herein I have got Sample QTP - AOM file. Such sample files are easily available on net but they hard code test path as well as result path. In this sample file I am going to read test path and results path dynamically from with in driver script, which would make script more portable Dim qtpApp 'As QuickTest qtpApplication Set qtpApp = CreateObject("QuickTest.Application") Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable qtpApp.Launch qtpApp.Visible = True qtpApp.Test.Settings.Launchers("Web").Active = False qtpApp.Test.Settings.Launchers("Web").CloseOnExit = True qtpApp.Test.Settings.Run.ObjectSyncTimeOut = 120000 qtpApp.Test.Settings.Run.DisableSmartIdentification = True qtpApp.Test.Settings.Run.OnError = "Dialog" qtpApp.Test.Settings.Web.BrowserNavigationTimeout = 60000 qtpApp.Options.Run.RunMode = "Fast" qtpApp.Options.Run.ViewResults = True qtpApp.O

QTP Glitches So Far...

Well, I have started work on QTP after having worked on couple of functional test automation tools like – Selenium and Test Complete. My first impression with QTP has not been very positive; herein I have listed few glitches I experienced so (I can only hope this list not overgrowing with time) No Refactor of code – so if u modify a function name in one place it has to be updated manually in all function calls “General Run Error” – try to check a check box which is disabled and you receive “General Run Error”! Can’t it say object is disable There have been other mysteriously intermittent instances of “General Run Error” about whom I am still groping in dark If used ExecuteFile to get function definition in Action then there is no way to jump to function definition from action. Function has to be opened manually. (I don’t associate function library as it is going to hardcode path to function) While running QTP tests on a System it can not be used for any other task, QTP keeps b

Initial QTP Scripts in CVS

In a QTP Test following files should be committed to cvs/svn – In Action – ObjectRepository.bdb Resource.mtr Script.MTS Root Folder – Default.xls Test.tsp Out of these files only “Script.MTS” is used by QTP tests for My App, but QTP still needs other files to open test, hence I had to add those as well. THanks, Tarun K

Deallocating memory in VB Script

I came across a few articles which talk about setting objects to 'Nothing' after its usages to release memory though I did not find any specific pointer about normal variables. I variable should be set to 'Empty' to deallocate memory, i.e. ****************************** Dim aVariable aVariable = 1 aVariable = Empty MsgBox IsEmpty(aVariable) Dim aObject Set aObject = CreateObject("Scripting.FileSystemObject") Set aObject = Nothing MsgBox aObject Is Nothing ****************************** For more on this refer here commented on - 16th Feb 2010 Looks like some one has different thought here

Using ExcelADO to fetch data from excel

We all are aware of externalizing test data from test scripts in test automation. We often stumble upon using excel as test data file, and I have seen crude ways of handling excel. i.e. - Creating Excel Application object Opening work book and fetching data Disadvantages of this approach are detailed on Microsoft website here - http://support.microsoft.com/kb/278973/EN-US/ In a gist following above mentioned approach would be process heavy and would make script execution (especially in case of long running test suites) slow Another crude way is to use sheet-name (which is still acceptable), Row and Column number (i.e. - (2, 5)), Row and Column range (B5, B10). Using row and column identifier is fragile as insertion of new data set in excel would break existing test scripts. A better approach to overcome these is to use ExcelADO along with name of Range in Excel. ExcelADO overcomes process over head and using Range to overcome fragility over Row and Column Range . In excel

Selenium Function Library

Poornima and I built collection of java Classes for selenium which provide capabilities which are not built in Selenium like - HTML Table Parsing, Custom Verification, Logging to name a few. This project is been existent from some time now, though I never had chance to write up on this. Whole project is available under "Repository" section of Veda for "Testing Competency" project and can be opened using java IDE like Eclipe. Best way to get acquainted with this API is to generate java doc your self which is no more than child's play. Make sure you have java 1.5 or higher and ANT 1.7.0 Configure System variable for Java and ANT, once having done this u should be able to see version of java and ant on your console on doing - "java-version" and "ant -verison" On Console navigate to path where Sel Library is check out, it turns out to be following for me - "D:\SelFunctionLibrary\SeleniumFunctionLibrary>" Execute following ANT

How to Avoid Hard coding of Paths in QTP Tests

We should avoid hard coding of paths in tests as this adds to portability of test from one machine other. Consider an action having following statement – Execute File (D:\GSB\QTP\fucntion\test.vbs) When tests are ported on a different machine then there is no guaranteed about drive mapping being same. To over come this, we can read path run time instead of hard coding it; as following - Make sure assignment of Global is first action as only then Run Time Env file would be available for usage. THanks, Tarun K