Saturday, May 21, 2011

The Day in the Life of a QTP Programmer

Generally we read titles like "A Day in the life of ....". But well.. this is not any ordinary day.. hence its not "A day" but "The Day" for me today. Today's day is worth a mention. Its past 12 now.. so I should rather say, yesterday is worth a mention.
Also, generally its addressed as QTP Tester, but here I have intentionally written "QTP Programmer". Because, what I feel is - QTP is more about programming the test cases/scenarios, and not testing the test cases/scenarios.

Since a long time, I was trying to connect to mainframe DB2 database from QTP. Earlier I had connected to excel with ADODB in my past scripts. This time, I had taken up a new module, which needed me to connect to the mainframe DB2 database.
I had never done that before. Well there is always a 1st time. But! first times become very difficult and challenging when
1) you are alone in the team trying it out, with no one to discuss
2) there is no one on the complete floor doing even least similar type of work
3) and I better not comment on the willingness of people to help someone
So, coming back to my topic, I started to attempt this thing in the month of Apil... and when I began, I had no clue as to what will be the pre-requisites, and other hows of it. But why worry!... Google zindabad. I wonder what will be the life of a programmer without GOOGLE ;)

I spent a lot of time and efforts on this thing.
After some initial google sessions, chats and calls with our co-developers of global and local team, I was able to gather some useful info. I reached till installing the DB2 client, getting the correct driver and creating a ODBC connection to desired database. With this I could connect to db2 via MS Access (thanks to a co-developer who showed me how I can test my connection in Access.). But when I was trying a DSN less connection via QTP it was erroring out. To get this resolved, I pulled the hell out of everything
- emails to global QTP forum of my company
- email to the COE team of my company
- email to my friends
- postmortumed each and every possible site with GOOGLE
- finally I raised a ticket with the HP Support team itself. With them I had conference calls to US, sent them video recordings of the error, emails to and fro...
I was very close to it ... but didnt know where was some thing going wrong... nor anyone else was able to figure it out.
And!

After a long series of trails and errors, I have finally been able to do what I was trying to. I dont know how but aaj mere dimag ki batti jali... may because after a long time today morning I had a good break from things, as we all team members had gone out for a movie - Pirates of the Carrebean sea, and then for a lunch in Ranjdhani... this might have relaxed my brains...
What I did -
a) I was already being able to connect to the created ODBC System DSN thru MS Access.
b) I was confident to connect to MS Access from QTP, as I had already connected to MS Excel earlier
So... when when a=b, and b=c then, a=c.....
 samjha?

meaning,
a) ODBC System DSN connected to the mainframe db2 database
b) MS Access database connected to the ODBC
c) QTP connected to the MS Access database via a DSN less connection.

hehehe, so simple na... yes it was. But this is like a long cut. But still it works and my purpose is server.

Today, I tried the above approach. While doing that also, I had to struggle a bit with getting the right code and setup in place, but that was not tough.
Though the main issue is still pending, of connecting QTP to DB2 directly, I am glad that I found a work around.

I did see that many people on google have been able to connect to mainframe DB2 database thru their QTP code or vb scripting... I didnt get why I was not able to.. and what exactly was the error... but well, if the HP ppl themselves couldn't resolve the error, then why I break my head :) ho na le? maan gaye.. kisse? meri paar ki najar.. aur Nirma super.. dono ko :P

When it worked for the 1st time.. when I saw that connection.state=1... I was not able to belive it.. did it really happen? Had it really got connected? it had...
next when I tried the record set to open, it was asking me for the mainframe user id and pwd. That was not desirable. I had provided it while opening the connection in connection string, but it was not enough...
Later, again I don;t know how, but mera hi dimag chala.. I figured out that these credentials could be stored in the ODBC configuration itself. When I did that, it worked. It stopped prompting for it in the code..
O my god.. is it really working? Let me check the records fetched... O my god.. fields values are coming.. my god..it is finally working...
I ran it 2-3 times, saved the code, documented what I did...
until then, I holded my excitement... and then, on my place I opened up in shocking but exicited voice that finally its working, I am able to connect, I have done it... :) yeeeeeeee

But all my colleagues were in their own world.. well unka bhi dosh nahi hai, they don't work on QTP...

My global and local manager were aware of this challenge, so in this weeks status report I highlighted that I was finally able to worked it out :) I am sure they will atleast undertand though not empathize.

Later, on my another desktop, on where it was not even connecting to MS Access, I uninstalled and reinstalled things, and tried the setups again. Well.. to my surprise, today, it worked over that machine as well. I was shocked. Whats with today. everything has started wrking? WOW.. what is there today..??? wat magic is happening?

With content and happiness, when I was packing and leaving, I heard 2 developers of ours, rejoicing. They called me. They were able to finally fix the defect I had raised in Cycle 0, in IST2 (Cycle 0, IST1 and then comes IST2)... they had been also wrking on it quite hard....I was very happy to know they finally did it. I congratulated them.
I could exactly empathize them... :)
So yesterday was the day of Solutions... not only for me, but for others as well :)

O man.... and important to mention... I had met my school friend ANUPAMA in morning on the Govandi Railway station... I think I met her after more than 10yrs.

Thank you so much GOD... for making my yesterday - THE DAY....
Thanks.

Sunday, May 08, 2011

Anxiety

[© Copyright 2011, All Rights for this poem reserved by author of this blog]

Tick Tick Tick, the clock will go,
Without notice, the time will flow.
Standing still, you watch the show,
What happens next, you will never know.

Bear the pinch, of time & fate,
Rest an inch, till he opens the gate.
Give him his chance, and have some faith,
The drama will end with a worthy wait :)        

Friday, May 06, 2011

Random

Suddenly after a long time, it felt like I was back today. Back to myself.

Lesson of the day: 5May2011
Its bad when you know you have done a good job and manager doesn't appreciate it. 
But! it's DANGEROUS, when you know you have not done a great job and still your manager appreciates it.