Wednesday, June 3, 2009

QTP framework for companies, automating the automation

Hi,

I am working as a QA Lead in chandigarh.. I joined QA field 2 years back.
I have 4.5 years of software developement experience in microsoft tech.
I GOT A TEAM OF 4 QA MEMBERS.

6 month ago... my company management asked me to have some sort of automation testing. Initially I took Selenium as it is a open source & easily available.
I created a selenium smoke testing script that runs over the build....

Then I found It is very tedious to work with it.
FINALLY I CHOOSE QTP TRIAL...EXCELLENT ONE...


I GOOGLED ABOUT MAKING A FRAMEWORK.. I PUT MY WHOLE DAY ... AND ALSO AKSED MY COLLEUAGE (MR. SAHIB) TO DO SO...
FINALLY AT THE END OF DAY...ALL WAS IN VAIN..

WHILE TRAVELLING TO MY HOME.. I AGAIN THOUGHT ABOUT IT.. WHAT TO DO..HOW TO DO.... THEN GOT A EXCELLENT IDEA..
EUREKA....

NEXT DAY I TOOK IT INTO HAND...WE STARTED creating a complete QTP testing framework without using any OBJECT REPOSITORY.

Then I decided to have such a script that will move over all the pages of website..
It uses vbscript FULLY. IT IS 90% COMPLETE NOW..

Here is how it works....

Using inputbox() of vbscript...
It asks for main folder name to be created for project...
It asks for login textbox name...
It asks for password textbox name...
It asks for login & password...
It asks for name of login button...
It tells total no. of links on page e.g. 96...
It asks for the link number to start with...
It collects window Page Title & URL in a text file (to check naming conventions)
It finds missing attributes like maxlength,alt,title, tabindex... etc..

Creates folders for each QTP test to be created
It copies a default test settings from a folder to each test automatically..
then creates the tests scripts automatically for all the pages...
grabs screen shots in a directory...
creates data table global sheet & puts column names automatically (does not matter number of controls)....
It fetches values from data table & does entry in all controls in the pages automatically...

fires input validations,mandatory and other,captures screenshots of crashes, page not found, gathers URL

checks spellings
checks W3C XHTML validations conformance
checks W3C CSS conformance
checks W3C WCAG conformance

other so many things.....

finally creates test suite .mtb automatically...


THATS IT...
NOW OUR LIFE IS SAVED & EASY.
DO YOU WANT TO KNOW WHAT WE DO NOWA DAYS?
WE JUST CLICK RUN BUTTON OF QTP AND GET ALL SCRIPTS IN SVN FOLDER AUTOMATICALLY.....
:-)

12 comments:

BorN 2 BooM said...

You are rocking man.

Anonymous said...

Hi Anil,
Can you please describe the framework in detail. I would like to have this framework set up for my automation tasks. I'll really appreciate your help.

Thank You,
Amit

Anonymous said...

It is very usefull and simple.Can you please send me the code of this.
I searched alot on net but did not find any reliable solution yet.

Anonymous said...

Hi, Anil

Thanks for the help.
Iam realy thankful to you

pradeep.testing said...

hi anil,

this is pradeep working as a software test engineer , we are currently working with a window based desktop application developed in .net,

i want to use qtp for this project, i am new to this, i don't know how to start and how to proceed . can you give me detailed way of creating a frame work for my application , can you also give the framework you designed so that it could be helpful to me in creating frame work for this project.

thanks
pradeep

pradeep.testing said...

my mail id pradeeptheetla@gmail.com

Anonymous said...

Thanks you very much appericiation: AKS

Anonymous said...

Hi All,Thanks you very much for your appericiation: AKS

Yadesh said...

Hi Anil,

Can you please send me the detail framework. I would like to use in my automation work. My emailid is tyadesh@google.com.

Thanks.
Yadesh

Kirill said...

I did similar thing with our product. I saved inner_html propertie value for each object of browse("...").page("...") as html file. Then run tidy.exe to convert all html to xhtml (it also verifies if your html is good). Then use MSXML2.DOMDocument.3.0 to parse each file as xml dom model. It works very fast under windows csript engine. If you run the same thing under QTP it will be 10 times slower.

Anonymous said...

Please send me the framework info.
ravimamidi@gmail.com
Thanks
Ravi

pradeep.testing said...

can u help me in creating frame work for my project plz
pradeeptheetla@gmail.com