Before starting actual automation task, we should do a tool evaluation and feasibility study to make sure QTP is the appropriate tool for automating test cases of our application. It can be done by selecting few sample modules/screens/flow from the application/test cases and create simple QTP scripts to make sure QTP will recognize the objects in our application.
As part of a Test driven development, we can ask the application development team to give proper name or any other identification properties for the objects, if our feasibility study reveals some difficulty for QTP to recognize the objects.
We should start our actual automation work only after completing some basic manual testing to make sure the application is stable and in working condition.
QTP developers should review the Test cases and update it to specify what are the test cases that can be automated. Because ideally it is not possible to automate all the test cases. The reason may be, difficulty in navigation or object identification issue or difficulty in verifying the result. If possible, the manual test cases can be rearranged to have separate automation test cases.
Once after reviewing all the test cases and after getting familiar with the application we can design the automation frame work for our need
Keep separate instance of application specifically for the purpose of developing automation scripts. It will avoid any unnecessary mess up with manual testing processes.
Set up proper QTP development environment with required Add-in and with any add-in extensibility. If many people are going to involve in the development activities then we need to clearly document the responsibility of each person and the approach for sharing the scripts. If application is installed in remote machine then QTP also should be installed in remote machine. Because QTP will not recognize the objects of application in remote session.
Set up proper object identification properties in QTP IDE.
Once after completing all the above basic steps, the first development task should be adding all the required Test Objects/properties to the Object repository It can be done by recording or by manually adding the objects to Object repository. If you specify any object using DP (Descriptive Programming) remember to document it.
Once after adding all the objects, rename them to have a unambiguous/meaningful name.
Based on your design of automation framework, create reusable actions and vbscript functions using step generator or keyword view or expert view or using Active screen.
Using these reusable actions prepare a sample/base script for executing few test cases. And then test it to make it error free.
Once after completing the above mentioned sample script, do parametrization (data driven testing) for executing multiple iterations.
Add checkpoints to verify the expected results.
Use appropriate Regular expression to make sure the script runs in all scenarios even when some properties are getting changed dynamically in particular pattern
Add the Recovery scenarios to handle any unexpected behavior of the application.
Use Environment variables to avoid any hard coded values in the script.
Do dry run for this sample script and debug the issues in the automation script and fix them
Do the above steps for all the test cases
Create a Driver script which will call all the test scripts.
Complete dry run for the Driver script.
Prepare.vbs script using Automation Object Model to run the QTP scripts in other environments also with same settings.
Run the scripts in desired environment.
Analyze the test results
Report the bugs/defects in the application once after completing the analysis.
Once after completing functional testing, select few essential scripts and store them separately for the future Regression Testing.