For beginners of QTP, it is very important to understand the difference between Action and the Test.
A QTP Test can have multiple Actions. The Actions can be arranged in nested manner (parent action-child action)also within the Test. Each Test will be stored as QuickTest Test. Actually it will be shown as Folder in windows explorer. Each Folder will have many files and many sub folders (one separate sub-folder for each Action).
Refer the below screenshot.
So it is clear that Actions are part of Test.
DataTables in QTP are used to enhance the script by doing Datadriven testing easily.
Refer the below screenshot.
The Datatable is having One Global Sheet and several local sheets based on number of Actions used in the Test.
The Global sheet is used for storing the data used for Test Iteration, and the local sheets are used for storing the data related to corresponding Action iteration.
The Test Iteration can be specified from Run tab of Test Settings (File->Settings).
The Action Iteration can be specified from "Action Call properties" window which can be opened from Right click menu (context menu) of the particular Action.
Now the next step is when we should use both Test iteration and Action Iterations.
Assume that you are testing flight booking application which comes along with QTP installation.
You need to test different test cases of booking tickets 5 times.
So, we can easily do it by entering the ticket details in 5 rows of Action sheets and setting "Run on All Row" in "Action Call properties".
We know that we need to login into the application before booking Tickets.
So now the tickets will be booked 5 times with single user login.
Assume that we need to test this with 4 different users.
So, we need to book the tickets 20 (5x4) times.
It can be handled by using both Test Iterations and Action Iterations.
The user login details can be kept in the Global Sheet and the "Run on All Row" should be set in the Test settings.
So now script will execute 20 times to make 5 bookings with 4 user logins.
eBook for learning Software Testing and QTP Automation.
More Articles...
Shop at Rajamanickam.com | Birthday Gift Idea? | Hire me for $6 per Hour
Get 3 useful ebooks for Rs 99 in India and $5.99 globally
Get a 75% commission | ChatGPT and and Google Gemini for Beginners (Use Discount code QPT)
Friday, May 15, 2009
Search This Blog
Art of Talking to AI | Tech eBook | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
1 comment:
Hi,
Your explanation on DataTable GlobalSheet and LocalSheet were so clear and I understood so well.
But if I want 4 users have their own booking data so all 20 tickets are different (4 users x 5 different data).
How to control the test with the Global/Local sheets?
This question puzzles me for a while.
Please email me your thoughts/ideal to:
rwang@econolite.com
I will really appreciate it.
Thanks,
Rachel
Econolite Group, USA
Post a Comment