Sunday, April 26, 2015

Connect QC through QTP(Running UFT scripts from ALM)

We can connect to QC from QTP through QTP File options or direct Icon on QTP window.

Go to your QTP File->QC connections->Provide the Server URL->Login credentials->Project and Domain details to which you want to connect.
Note:Check the Option to Auto connect to QC with each QTP session , in order to avoid entering these details again & again.

Source: http://www.geekinterview.com/question_details/81672

-----------

 Connect UFT to ALM:

http://www.guru99.com/hp-alm-integrate-uft.html

QTP and QC:

source:  http://www.tutorialspoint.com/qc/qtp_qc_integration.htm

QTP-QC Integration:

In this section, we are going to learn how to integrate QTP and QC. By Integrating, the QTP automation scripts can be executed right from Quality Center. For establishing a connection, first step is to install the required Addins. We will understand how to integrate by taking a sample QTP script and execute it from QC.
Step 1 : Navigate to ALM home page and click on "Tools" from the list of links.
QTP QC 1 Step 2 : Click on "More HP ALM Addins" Link from the addins page as shown below.
QTP QC 2 Step 3 : In the Addins page, select "Addins for HP applications" and choose "Quick Test Professional". In case of "Unified Functional testing" (UFT), choose the options appropriately and install the addins. The Installation is similar to HP-MS Office Addins.
QTP QC 3 Step 4 : Establish a connection between QTP and QC by Navigating to "File" >> "ALM/QC Connection".
QTP QC 2 Step 5 : HP ALM Connection dialog opens. Enter the Server URL as shown in the below example.
QTP QC 3 Step 6 : Once the URL is correct, the credientials dialog opens. Tester has to connect to the relevant project area.
QTP QC 4 Step 7 : Once ALM Connection is successful, we need to save the Driver Script in Quality Center. Select ALM/QC Plan as shown below.
QTP QC 5 Step 8 : Once the test is saved, we can see the in ALM where the test type is shown as "Quick Test".
QTP QC 6 Step 9 : Upon Navigating to "Test Script" Tab which appears only if the test type is of "Quick Test", The script shown in QTP screen would be displayed in Quality Center as well.
QTP QC 7 Step 9 : The other necessary component that is required for script execution is Library files which can be placed under "Test Resources" Folder.
QTP QC 8 Step 10 : The Function Library file can be added by creating a new resource of type ".qfl" or ".vbs" .
QTP QC 9 Step 11 : The Added library file can be accessed in quality Center using resource Viewer.
QTP QC 11 Step 12 : If there are more library files, the same is added by creating a new resource of type ".qfl" or ".vbs".
QTP QC 10 Step 13 : Once again, Added library file can be accessed in quality Center using resource Viewer.
QTP QC 12 Step 14 : The Next dependant component for any script execution is "Object Repository" which is again placed under "Resources" section.
QTP QC 13 Step 15 : The added Object Repository and its properties can be viewed using "Resource Viewer".
QTP QC 14 Step 16: The Datatable, parameterized data setup also be placed in Quality Center under "Test Resouces" section.
QTP QC 16 Step 17 : The added data Table can be viewed using in "Resource Viewer".
QTP QC 17 Step 18 : The Datatable should now also be mapped to the test settings so that they can be picked while execution. The same can be done using "Settings" of "File" Menu.
QTP QC 15 Step 19 : The Test Settings dialog opens. Navigate to Resources Tab and select the Datatable that we added in Step 16.
QTP QC 24 Step 20 : Now we can access those test resources that are uploaded in Quality Center in QTP script as shown below. The Libraries files and Object Repositories are binded dynamically.
QTP QC 23 Step 21 : Now, we should allow QTP to interact with other Hp Products. This will allow QTP to interact with Quality Center. Goto "Tools" >> "Options"
QTP QC 18 Step 22 : Now, enable "Allow other HP products to run tests and components" as shown below.
QTP QC 19 Step 23 : The Next Step is to add the test in "Test Lab" and execute the test. The Procedure to Add tests into Test Lab remains the same as that of manual tests.
QTP QC 20 Step 24 : Upon Clicking on "Run", the automatic runner opens and enable "Run all tests locally" and hit "Run".
QTP QC 21 Step 25 : Once execution is complete, the test result is displayed on the the same "Automatic Runner" dialog.
QTP QC 22 Step 26 : In Test Lab QTP report is loaded automatically. User can click on "Launch report" to get to know about more details of the execution.
QTP QC 23

4 comments:

  1. I have faced the issue while loading Datatable because it is not the same way how you load library files and object repository in ALM.

    To load the DataTables, you first need to add resource and then go to the resource view to upload file the Excel file in the ALM. Make sure the Resource name and Excel file name matches, to avoid confusion.

    ReplyDelete
  2. Another I have faced is with the Add in: Please find below steps I followed to successfully connect ALM to UFT(in a high level)

    1. Write script in UFT.
    2. Using ALM in the menu bar in UFT, connect to the ALM project.
    3. Save the Test Scripts, Reposiotry, Data tables and Libraries as mentioned above and in the comments.
    4. Go to tools->options and then gui test runs to select "allow other HP tools to run the script" option

    Even after doing all these I was not able to run the scripts from ALM: The issues I faced are:
    1. ALM add in should be installed along with UFT(not the one we get in ALM addins page) --- I re-Installed UFT so I was able to see saved UFT scripts in ALM
    2. Getting time slot error???

    ReplyDelete
  3. When I run QTP script from ALM, I am getting the error as:
    "You cannot run the test as you do not have sufficient permission to create or update the performance testing timeslot. For more information, contact administrator". How to fix it?

    ReplyDelete
  4. #PermissionError: I have found the fix(from TestingServices).

    See I was running the scripts from Training_handson project in ALM and Test set type was "functional".

    As per HP team, since the test set was of type "functional" one cannot run the scripts in Training_Handson project. If one needs to run the scripts in Training_Handson project, test set type has to be selected as "default". Because of test set type mismatch, I was getting permission error.

    And if you wanted to run the test sets of any type, you should have own project in ALM.

    Support team email says: If you want to use ALM Functional test feature, you can only do it from your own QC project, that is added to UFT remote hosts.

    Note 1: Looks HP does not want the users of Training_Handson project to use UFT that are installed in remote. That might lead to lots of traffic.

    My next question what does Test set type "functional" mean and how is it different from 'default" type?

    ReplyDelete