Wednesday, October 3, 2007

Project: Automation Framework

I am currently developing Automation Framework using QTP for my company and want to share the processes i undertook and will undertake in the next couple of months.

The BEST online resources i got are the following:
http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm - This site will tell get you started in developing you very first Automation Framework.

http://www.sqaforums.com/showflat.php?Number=337920 - This is a forum for the QTP Framework Demo and get continous update from experts around the world. I got most of the coding idea in this demo. You need QTP 9.2 to run this though.

http://www.sqa-test.com/method.html - Provides summary of how different types of Automation Framework works.

Step 1: You need to define the Coding Standards first. I researched the Coding Standards for VBScripting since QTP uses this code. This will make the scripts easier to maintain and track. Also if you want to assign specific tasks to other members of your team your codes will be much easier to read and comprehend.
Step 2: Choose the right framework for you. If you can't decide then i suggest you use the most flexible and common which is the Hybrid of Data-Driven and Keyword-Driven framework (see sources above). This might take longer to implement but its worth it since it's comparable to using the latest technique or technology available.
Step 3: Learn that framework and all its concepts.
Step 4: Understand the flow of the QTP Framework Demo.
Step 5: Design the pseudocode first and all the process flows before coding. This will save you a lot of time in revisions. Make sure you already visualize all possible scenarios and improvements you need to make before coding. That way you will just concentrate on making the code work and not thinking of the plan on the fly which is prone to error and inefficient.
Things to consider.
- Data of your source document
- Things that needs to be dynamic like browsers, Window title, Page title, etc
- Your framework must support running a single test case only or group of test cases
- Your Test Report should indicate the Step Name or Suite Name or Group Name
- Be consistent. If you use .xls then use .xls all throughout.
- Visualize using the framework on an actual project so that you can formulate the features you may need
Cont...

No comments: