05-13-2012, 01:30 PM
(This post was last modified: 05-13-2012, 05:18 PM by Anish10110.)
Mostly, the approach should be Functional + Data Driven ie Hybrid Framework. But deciding how the framework should be designed depends on the application and the flows you have.
The first thing. Analyze all the test cases and then come up with what all business flows you have. Try to see if there are any reusable flows.
For example: suppose you have 3 test cases.
1) Login and create order and logout.
2) Login and search order and modify order and logout.
3) Login and search order and delete order and logout.
So here you can identify that Login, Logout and Search Order are reusable flows.
Once this is done. You can try creating the framework. Your entire framework, data sheet structure etc will be based on this only.
As of now you can start with 1 TC for each of the 20 workflows(I'm assuming that these workflows are test cases with multiple smaller flows.
Steps to write framework:
1) Write the full flow in the test case. Hard-code all data values as of now.
2) If there are any reusable flows in the test case, create functions for those and save it in function library and call from there.
3) Now write the code which will take the data from data sheets.
4) For the sake of simplicity, you can have 1 excel workbook with 20 sheets. Each sheet for each test case.
5) This way create the first test case as per the framework.
6) Add all the error handling mechanism and all other required things to the same test case.
7) Now you will have 1 TC which is written as per your framework.
8) Once 1 TC is finished, you can follow the above process only to create other test cases as per the framework.
You can also check the attached eBook on QTP Framework Basics.
Note: Please make sure you contribute to the forum on regular basis before posting links to 3rd party sites. For new members, this forum software will automatically mark all posts as spam which contain link to other sites.
The first thing. Analyze all the test cases and then come up with what all business flows you have. Try to see if there are any reusable flows.
For example: suppose you have 3 test cases.
1) Login and create order and logout.
2) Login and search order and modify order and logout.
3) Login and search order and delete order and logout.
So here you can identify that Login, Logout and Search Order are reusable flows.
Once this is done. You can try creating the framework. Your entire framework, data sheet structure etc will be based on this only.
As of now you can start with 1 TC for each of the 20 workflows(I'm assuming that these workflows are test cases with multiple smaller flows.
Steps to write framework:
1) Write the full flow in the test case. Hard-code all data values as of now.
2) If there are any reusable flows in the test case, create functions for those and save it in function library and call from there.
3) Now write the code which will take the data from data sheets.
4) For the sake of simplicity, you can have 1 excel workbook with 20 sheets. Each sheet for each test case.
5) This way create the first test case as per the framework.
6) Add all the error handling mechanism and all other required things to the same test case.
7) Now you will have 1 TC which is written as per your framework.
8) Once 1 TC is finished, you can follow the above process only to create other test cases as per the framework.
You can also check the attached eBook on QTP Framework Basics.
Note: Please make sure you contribute to the forum on regular basis before posting links to 3rd party sites. For new members, this forum software will automatically mark all posts as spam which contain link to other sites.