340 likes | 447 Views
Create a Test Set. Mercury/HP Utilities. TIP. Fr Project staff have made an improvement to the presentations. Whenever you see QTP code, right click the left bottom part of the presentation and do the following :. 1. 2. Click. Topics covered.
E N D
Create a Test Set Mercury/HP Utilities Dani Vainstein & Monika Arora Gautam
TIP • Fr Project staff have made an improvement to the presentations. • Whenever you see QTP code, right click the left bottom part of the presentation and do the following : 1 2 Click Dani Vainstein & Monika Arora Gautam
Topics covered • Creating a test-set using Test Batch Runner Utility. • Creating a test-set using Mercury Multi-Test Manager. • Configuring The Mercury Multi-Test Manager. Dani Vainstein & Monika Arora Gautam
Creating a Test-Set Using Test Batch Runner • Up till now we have 3 tests, in our Tests Folder. • We will create a Test-Set for all the tests. • As we continue working on project we will keep adding new tests to our existing test-sets. • For this purpose we will use the Multi-Test Manager. • Those who are using Quality Center can skip this presentation. Dani Vainstein & Monika Arora Gautam
Test Batch Runner • Open the Test Batch Runner from Start Programs Quick Test Professional Tools Test Batch Runner. Dani Vainstein & Monika Arora Gautam
Test Batch Runner Dani Vainstein & Monika Arora Gautam
Add a Test to Test-Set • Menu : Batch Add • Hotkey : Ins ( Insert ) • Toolbar Add a Test Dani Vainstein & Monika Arora Gautam
Add a Test to Test-Set • from the folder according to the consequent requirements numbers. • Req0001, Req0002, Req0003 Dani Vainstein & Monika Arora Gautam
Automation FR LIB RA BL GL RS DOC DAT SETTING TESTS RES BATCH ENV Create LoginRegression Test-Set Save Save the Test –Set Batch File with name LoginRegression.mtb under FR\BATCH Folder Dani Vainstein & Monika Arora Gautam
Run the Test-Set Run • Run the test-set Batch Run • Or hotkey: Press F5. • Once batch run is complete, you can view the results for each test in its default test results folder <test folder>\Res#\report Dani Vainstein & Monika Arora Gautam
Creating a Test-Set Using Multi Test Manager • The Multi-Test Manager is not a part of QTP 9.2 it might be a part of QTP 9.5 • You can download the installation files from this location Multi Test Manager only for FR Project members Dani Vainstein & Monika Arora Gautam
Test Multi Test Manager • After you have installed the Multi-Test Manager open it as described below. Dani Vainstein & Monika Arora Gautam
The Multi Test Manager ( MTM ) Dani Vainstein & Monika Arora Gautam
Creating Test-Set Using MTM • Menu : Batch Add • Hotkey : Ins ( Insert ) • Toolbar Add a Test Dani Vainstein & Monika Arora Gautam
Add all Tests to Test-Set • Add all 3 tests to the test-set. • Req0001, Req0002, Req0003 Dani Vainstein & Monika Arora Gautam
Automation FR LIB RA BL GL RS DOC DAT SETTING TESTS RES BATCH ENV Create LoginRegression Test-Set Save Save The Test-Batch File with name LoginRegression.mtm under FR\Batch folder Dani Vainstein & Monika Arora Gautam
Before You Run the Batch… • You can increase the capability of the tool by modifying some properties. • MTM can generate test reports after running test batch. For this purpose create a new folder call ‘REP’ ( Reports ) in \Automation\FR\REP • Select Preferences. • Menu : File Preferences • Toolbar Preferences Dani Vainstein & Monika Arora Gautam
Run Tab • You can run on a localhost or remote machine. • You can perform a scheduled run. • Stop test run on failure. • Run scripts continuously. • Close the properties dialog. Dani Vainstein & Monika Arora Gautam
Report Tab • Select "Create Multi-Test Manager Report". • Select "View Report After Batch Run.“. • Unselect the "Use Default Location" option. • Select the "Specify Location". • Select the REP folder under FR\REP to specify the report location. • Click on "Add..." button and enter following details: • Report Name Project Name • Value FR Select REP Folder Dani Vainstein & Monika Arora Gautam
Mail Tab - eMail Account Dialog • You can send email notifications • Enter your email account. Dani Vainstein & Monika Arora Gautam
Mail Tab • You can define, when an email will be sent. • It can be sent to a list or a particular person from your outlook address book. • It can include a custom subject and message. Dani Vainstein & Monika Arora Gautam
Script Properties • Select the first test in the list. • Select script properties • Menu : Batch Script Properties • Toolbar : Properties Dani Vainstein & Monika Arora Gautam
RES Change Result Folder Dani Vainstein & Monika Arora Gautam
Multi Test Manager Result Folder Dani Vainstein & Monika Arora Gautam
Excellent tool…with few limitations • You cannot send arguments to the test. • You have to modify the scripts result folder one-by-one. • Cannot view the reports and status all at once. • Cannot modify the Report name manually from the tool.( I usually use the test-set name + Date + Time ) • Cannot run instances of the same test. • The MTM also has a COM interface ( read attached documentation of the MTM ), most of the limitations can be "workaround" using the MTM methods and properties. Dani Vainstein & Monika Arora Gautam
MTM File opened by Notepad You can open the LoginRegression.mtm file located under FR\Batch using notepad. Dani Vainstein & Monika Arora Gautam
Running an mtm File. • Run the mtm file. • Menu : Batch Run • Hotkey : Ctrl + R • Toolbar Run Dani Vainstein & Monika Arora Gautam
Run End Dani Vainstein & Monika Arora Gautam
Report Dani Vainstein & Monika Arora Gautam
Comparing TBR and MTM • Both tools Run the Test Batch File. • However MTM gives much more flexibility to the user by generating the report of the test-batch showing the status summary in html format. • Also gives flexibility on types of run ( stop on failure, Run continuously ) also simulates a load, by running tests on a network machine, let user add custom variables to report and more. • Makes task easier for a team to run all tests created by single command and sends out the email of run-status to the entire team. • It supports a rich COM interface. • Remark : To run tests on network machine QTP must be installed on that network machine. Dani Vainstein & Monika Arora Gautam
Summary • We learned how to run test-sets using 2 built-in tools of QTP although MTM will come with 9.5 version. • Using the “Test Batch Runner” • Using the “Multi Test Manager” • Configuring the “Multi Test Manager”. • Those tools are a good option for those who doesn’t use Quality Center. Dani Vainstein & Monika Arora Gautam
What’s Next? • Implementing Req0004 • Using The Global Dictionary. • Using Loops. • Inserting a call to a “copy” of an existing action. • Deleting an existing action. Dani Vainstein & Monika Arora Gautam
Special Thanks To • Tali Hizkia from Israel, Tel-Aviv. • Paul Grossman from USA, Chicago. • Dalvinder Matharu from USA, San Jose. • Mike Manchester from USA, Bolivar. • Joydeep Das from India, Hyderabad. • Rajesh Patel from USA, Chicago. • Richi Sharma from USA, New Jersey. • Bharathi Babu from India, Pune. • Sanjeev Mathur from India, Noida. Dani Vainstein & Monika Arora Gautam
Make sure to visit us for: Tutorials Articles Projects And much more @ www.AdvancedQTP.com 34 Dani Vainstein & Monika Arora Gautam