Monday, April 11, 2016

Modular Framework in QTP

Modular Framework is the approach where all the test cases are first analyzed to find out the reusable flows. Then while scripting, all these reusable flows are created as functions and stored in external files and called in the test scripts wherever required. Consider the following 2 test cases.

a) Login > Create Order > Logout.
b) Login > Search Order > Logout.

Here Login and Logout are the reusable flows. Functions would be created for each of these flows which will be saved in an external function library. The test scripts would look something like this.



Components and Workflow of Modular Framework




In order to use the functions from the external library file, the library file must be first associated to the test cases. Once this is done, the test case can call all the functions present in the library file.

Advantages of Modular Framework
  • Test Scripts can be created in relatively less time as the reusable functions need to be created only once.
  • Effort required to create test cases is also lesser due to code reuse.
  • If there are any changes in the reusable functions, the changes need to be done in only a single place. Hence script maintenance is easier.
Disadvantages of Modular Framework
  • Since data is still hard coded in the script, the same test case cannot be run for multiple data values without changing data after each run.
  • Additional time is spent in analyzing the test cases to identify with reusable flows.
  • Good programming knowledge is required to create and maintain function libraries.

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.