Transcript Create a Test Set Mercury/HP Utilities Dani Vainstein & Monika Arora Gautam.
Create a Test Set
Mercury/HP Utilities Dani Vainstein & Monika Arora Gautam 1
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 2
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 3
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 4
Test Batch Runner
Open the Test Batch Runner from Start Professional Tools Programs Test Batch Runner.
Quick Test Dani Vainstein & Monika Arora Gautam 5
Test Batch Runner
Dani Vainstein & Monika Arora Gautam 6
Add a Test to Test-Set
Menu : Batch Add Hotkey : Ins ( Insert ) Toolbar Add a Test Dani Vainstein & Monika Arora Gautam 7
Add a Test to Test-Set
from the folder according to the consequent requirements numbers.
Req0001, Req0002, Req0003 Dani Vainstein & Monika Arora Gautam 8
Create LoginRegression Test-Set
Automation FR LIB RA BL GL RS DOC DAT SETTING TESTS RES BATCH ENV Save Save the Test –Set Batch File with name LoginRegression.mtb under FR\BATCH Folder Dani Vainstein & Monika Arora Gautam 9
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
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 11
Test Multi Test Manager
After you have installed the Multi-Test Manager open it as described below.
Dani Vainstein & Monika Arora Gautam 12
The Multi Test Manager ( MTM )
Dani Vainstein & Monika Arora Gautam 13
Creating Test-Set Using MTM
Menu : Batch Add Hotkey : Ins ( Insert ) Toolbar Add a Test Dani Vainstein & Monika Arora Gautam 14
Add all Tests to Test-Set
Add all 3 tests to the test-set.
Req0001, Req0002, Req0003 Dani Vainstein & Monika Arora Gautam 15
Create LoginRegression Test-Set
Automation FR LIB RA BL GL RS DOC DAT SETTING TESTS RES BATCH ENV Save Save The Test-Batch File with name LoginRegression.mtm under FR\Batch folder Dani Vainstein & Monika Arora Gautam 16
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 Toolbar Preferences Preferences Dani Vainstein & Monika Arora Gautam 17
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 18
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 Value FR Project Name Select REP Folder Dani Vainstein & Monika Arora Gautam 19
Mail Tab - eMail Account Dialog
You can send email notifications Enter your email account.
Dani Vainstein & Monika Arora Gautam 20
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 21
Script Properties
Select the first test in the list.
Select script properties Menu : Batch Toolbar : Script Properties Properties Dani Vainstein & Monika Arora Gautam 22
Change Result Folder
RES Dani Vainstein & Monika Arora Gautam 23
Multi Test Manager
Dani Vainstein & Monika Arora Gautam Result Folder 24
Excellent tool…with few limitations
1.
2.
3.
4.
5.
6.
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 25
MTM File opened by Notepad
You can open the LoginRegression.mtm file located under FR\Batch using notepad.
Dani Vainstein & Monika Arora Gautam 26
Running an mtm File.
Run the mtm file.
Menu : Batch Hotkey : Ctrl + R Run Toolbar Run Dani Vainstein & Monika Arora Gautam 27
Run End
Dani Vainstein & Monika Arora Gautam 28
Report
Dani Vainstein & Monika Arora Gautam 29
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 30
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 31
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 32
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 33
Make sure to visit us for:
Tutorials Articles Projects And much more @ www.AdvancedQTP.com
Dani Vainstein & Monika Arora Gautam