Wednesday, August 26, 2015

Recovery Scenario

http://www.tutorialspoint.com/qtp/qtp_recovery_scenarios.htm

Resource -> Recovery scenario

4 types of trigger events

- Select type of Trigger event
- Then using object spy select the object on which you wanted to perform Recovery
- What to perform when trigger occurs
-

Save the Recovery scenario once it is created. So you could see Recovery scenarios in Resource->Recovery Scenario window.

Recovery Scenarios will be listed in there, so select them whenever you need.








Thursday, August 20, 2015

API Test and how is it different from GUI Test?

When you create a test in QTP, it will ask whether you need to create GUI or API test. What exactly is API test and how is it different from GUI.

I am assuming that GUI is all about web applications....



API - is web service testing. So it means QTP is used to test API's.

Working on Data table in UFT and ALM and Connection

8/20/15:
Source: http://www.joecolantonio.com/2014/01/09/uft-api-how-to-data-drive-your-script-using-an-alm-resource/



How do I data drive a UFT script with ALM Resource?
I’m often asked the question “How do I data drive my UFT script using a resource stored in ALM“? I decided to finally create a simple example to explain the steps needed to do this. Hope it helps.
1. Create an Excel file
First let’s create two Excel spreadsheets that will use in our example:

  • In Excel create a new Blank workbook and enter the following:
  • Save as ALMDEBUG1.xlsx
  • In Excel create another workbook and enter the following:

  • Save as ALMDEBUG2.xlsx
2. Create a UFT API script
  • Under the UFT menu click on the ALM>ALM Connection
  • Under the HP ALM Connection enter your ALM info
  • Create a new UFT API script named ALMTable and save it in ALM
  • In the new UFT API test drag a Math>Add activity on your main canvas area

  • From the UFT menu click View>Data
  • Click on the New Data Source and select Excel from the menu

  • In the New Excel Data Source’s
    Excel file path point to the ALMDEBUG1 excel file we created earlier.
  • Make sure that you select the Allow other tools to override the data option. Click OK

  • Next we will point the values of the Add activity to the values in our ALMDEBUG excel file
  • Click on the Add activity’s Properties Input/Checkpoints icon.
  • Under Add Input click on the Link to data source link for the A & B properties and the Result checkpoints. For each one in the Select Link Source click on the Data source column and select the input’s corresponding value:

  • Save the script and close UFT
Now that we have the script ready let’s set up the ALM piece.
3. Create a Resource in ALM
  • Click on the Test Resources area in ALM
  • Click on the New Resource icon

  • In the New Resource dialog box enter the following:
    • Name: ALMTABLE
    • Type: Data table

  • Click on the Resource’s Resource Viewer and select the Upload File to point to the ALMDEBUG2.xlsx (this one that has the 10 + 10 row) excel file we created in the first step

  • Next click on the ALM Test Plan
  • Navigate to the folder where you saved the ALMTable API script we created earlier.
  • Click on the ALMTable script’s Parameters tab

  • Click on the Data Resource dropdown menu and select the ALMTABLEresource we created

  • Then click on the Map Parameters button and map the Resource Parameters Names with the Test Parameters Names

  • Click OK
  • Click on the Test Configuration Tab
  • Click the Data tab
  • Under the Data Tab enter:
    • Select Dynamic
    • Click the Overide test data resource checkbox
    • In the Data Resource dropdown select the ALMTABLE resource

4. Time to Run the Test
  • Click on the ALM Test Lab area
  • Create a New Test Set called ALMUFT
  • In the ALMUFT test set add the ALMTable test we created earlier
  • Click Run

  • Click on the Launch Report button

  • You should now see the data used in our script that is stored in the Resource. Notice when we created the script we used the excel values in the ALMDEBUG1.xlsx (1 + 1 = 2). Now it is using the ALMDEBUG1.xlsx values (10 + 10) we have stored in the ALM resource we created. Cool!

Monday, August 17, 2015

UFT/QTP file types


Source:http://www.ufthelp.com/2013/03/uftqtp-file-types.html
UFT/QTP file Types

UFT file types:-

UFT File Type
File Extension
Local/Shared Repositories
.MTR , .TSR
Function Library
.QFL, .TXT,.VBS
Recovery Scenario
.QRS
Script file
.MTS
Environment Variable file
.TXT,.INI,.XML
Database file
.XLS,.MDB
Action file
.MST
Virtual Object
.VOT
Batch test file
.MTB

Thursday, July 30, 2015

Connecting QTP to MicroStrategy????

I am trying to automate manual test cases written to validate reports created using MicroStrategy.

Manual Test Cases are to validate the label, rows count, data in the report is appropriate.

Currently we are planning to automate these test cases, but to begin, how are we going to connect QTP to MicroStrategy.


I got to know axis@work and GMIP tools could be use to validate MicroStrategy reports.
Right now our client is looking to use UFT/QTP, but any information on axis@work and GMIP tools should also help. 

Friday, July 24, 2015

Scenarios


  1.         DemoQA.com

1.      Go to the website
2.      Click on Registration link, and register the user
3.      Click on the Links on Interactions section:
o   Draggable – Go to Draggable + Sortable  - Move the item 1 under Item5 using mouse
o   Droppable – Go to Shopping cart demo – Select Lolcat Shirt from T-shirts drop in Shopping Cart. Dropped item should be seen in the Shopping cart.
o   Resizable – Go to Max/Min size – reduce the size of the window
o   Selectable – Go Serialize – select the items and selected items should be listed on the top
o   Sortable – Go to Portlets – click on minimize buttons on Feeds
4.      Click on Links in Widget section:
o   Accordian – Fill Space – Select Section 3
o   Autocomplete – go to Categories – click search field, enter ‘a’ and from the auto populate select ‘Antal’.
o   Datepicker – select field Date and select date from the pop up or calendar
o   Menu – click on Menu with Sub Menu – select News and then Sub Menu Item 2
o   Slider – In the Range slider, slide the slider so that bed room count displays 4
o   Tabs – Click on Tab2
o   Tooltip – Go to custom animation demo – move mouse over on ‘hide’, to see the tool tip ‘explode on hide’ is displayed
5.      Click on Frames and windows
o   Open New Window – click on New Browser Tab – to make sure a new window is displayed
o   Open Separate New window – click on Open new Separate window – to make sure a new tab is displayed
o   Frameset – click on Open Frameset Window -  make sure two frames are displayed
6.      Miscellaneous
o   Place cursor on Tools icon, the color of the icon should get changed(it gets blurred)
o   Check Tools icon is displayed. Image should be validated
o    
o    


7.      Do the above in chrome and IE


Scenarios from Internet:



Use QTP tool to automate below Test Scenarios?(Automate below test cases using QTP tool and save at your machine for evaluation)

  1.         Automate using QTP “login successful” functionality for Flight reservation desktop                   application
  2.        Automate validating “login unsuccessful” functionality for Flight reservation desktop                application using QTP tool?
  3. Using QTP automate validating “login successfully functionality” for three correct users names and passwords for Flight Reservation desktop application? Hint: You have to use QTP parameterization feature.
  4. Automate flight search functionality for Flight reservation desktop application? Hint: “Open an existing Flight reservation with particular order number”
  5. Automate booking new flight functionality for Flight reservation desktop application? Hint: “Insert new reservation and add checkpoint to check reservation inserted or not”
  6. Describe steps for automating “update existing reservation and check reservation updated or not?” functionality for Flight reservation system. Use QTP automation testing tool and automate this flow?
  7. Automate “gmail login successful” test case using QTP Testing Tool?
  8. Automate gmail login unsuccessful for all possible incorrect usernames and password scenarios” using QTP tool? Hint: You have to create one test case for each incorrect login and password scenario.
  9. Automate end to end flow for http://newtours.demoaut.com using QTP tool? Hint: End to end means login, booking flight, paying and exiting etc.
  10. Using QTP batch feature run gmail login successful and all login unsuccessful test cases in batch mode? Hint: Watch video and try to do this test case.
  11. Write a code that will capture Fly from and fly To drop down values..save to a user defined sheet and later Export the run time sheet to user defined Drive..


Sceanarios from diifferent source: