0

So it’s been 5 years since I have been working on manual testing and from 6 months back I was working on QTP 10.0 version at home. I understood some basic things and can write basic QTP scripts for web based applications.

I have written some scripts for my web based application, but I honestly have no idea, how to start the framework design in QTP.

My goal is to learn the building QTP framework from the scratch, would be nice if an automation test engineer can respond, how can to start designing QTP hybrid framework from the scratch.

3 Answers 3

2

The question is too broad, however I will try to answer as best as I can.

A framework is a combination of predefined process and components that can be used to write actual automation scripts.

Following are the critical features of any automation framework

  1. Test GUI Object Repository - Any UI automation will have objects to interact with. These object will have to be stored and retrieved in an efficient manner and used in automation scripts. Either Object repository or descriptive programming approaches can be used however it should be uniform across the automation project, otherwise you will have very troubled automation project, where you can't find if you already have a certain objects or if you have to create a new one. This will create confusion and duplicate objects.
  2. Configuration - How are you going to do the configurations required for your tests, how are the people going to change this configuration settings? ini files or property files or xml files can be used what ever approach is used, certain convention has to be formulated and communicated to the entire team.
  3. Data parameterization & input data modifications - The main requirement of automation tests is that it can run for different sets of data without too much modification or fiddling. Typically data will be stored in excel files when it comes to QTP. However Certain wrapper funcitons needs to be written so that bulk data required for tests can be read easily. For example, if all your tests need address which consists of 10 fields, your framework should provide quick way for people to read all 10 fields without having write code for all ten fields. How will you maintain data for hundreds of tests? Are you going to maintain in one excel file? or are you going to create multiple xml files? How are you going to store common data? All these questions must be answered and necessary functions must be written before you can call your framework complete.
  4. Test Dependencies & Order of execution - How does your framework solve the problem of running all pre-requisite steps required for certain tests? Are there going to be dependencies between tests? In such case how will you ensure all tests can be run without duplicating the code? Your framework should take care of that. How will the tests be triggered?
  5. Filtering of tests - Your framework should also take care of easy filtering of tests. If you want to run only 20 out of 100 tests you have, how will you do that? Some frameworks do that by making use of extra column in your data file where you mention whether a certain test should run or not. There are other approaches as well.
  6. Naming conventions - Naming conventions are very important for tracing of tests. Especially if you don't use a test management tool and test automation tool from same company. If your company writes all tests in excel but uses QTP to automate how will you ensure that your automation scripts are running all the tests? Naming conventions will help you there.
  7. Error handling incase of exceptions - What happens when a test is stuck and couldn't continue, how does your framework ensure that you don't come back in the morning and find that your test execution is stuck in test number 2?
  8. Easy reporting of failures - How does your framework report failures? Is it always going to be reports that are generated by QTP? Is it easy for a project manager to see the QTP report and understand how many tests failed and how many passed?

Try to solve each of these questions, you will be able to create a framework on your own by the end of implementation of solutions for all the above issues.

0

i highly recommend the course "Mastering Test Automation" offered by SQE. all aspects of the test automation framework are covered (high-level).

http://www.sqetraining.com/training/course/mastering-test-automation

1
  • 1
    Daniel I didn't see any mention of QTP in the course outline of the provided link and it sounds like Girish is looking for information specific to the QTP framework.
    – Francis
    Commented Nov 26, 2013 at 4:39
0

QTP Automation have list of Frameworks available, but before using any of them you need to check for your project specific need. Below some types of Automation Frameworks listed:

  1. Data driven framework
  2. Key word driven framework
  3. Test Library Framework
  4. Hybrid Framework
  5. BPT framework

Some more are there so you need to check the need of your project and implement any one approach to make your test more easy and smooth.

For example : I have requirement of testing same set of test cases with lakhs of different set of data, in that case i ll be using data driven.

Hope it helped you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.