SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to run QTP from QC in a local folder?

    Hello guys,

    I've been using QTP for a long time. Now I want to use Mercury QC to run my QTP tests.

    All my tests are saved in a local folder (i.e. C:/myQTP/testcases). I've been trying to link QC to the QTP files located in this folder, so I can update my tests in the QTP and I can have these updatings straight in QC. But I don't know how to do it.

    QC previously needs to load files from QTP in its own repository, i.e.:

    [Qualitycenter]Subject\xxxx\xxxx

    My question is:

    Can I run tests in QTP from QC without having to "export" them to the QC database?

    Thxs!

  2. #2
    Moderator
    Join Date
    Oct 2010
    Location
    Norway
    Posts
    3,265
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: How to run QTP from QC in a local folder?

    Jordi,

    There's no option to do it. You will have to import them into QC and then execute it.

    If you have too many scripts and tired of importing them manually, write a quick OTA script to upload it.
    Rajkumar

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run QTP from QC in a local folder?

    Hi Rajkumar

    It could be the solution, but It might take too much time to load the tests. Plus, I am not v good at programming scripts,..

    I think I will have to use a different tool to run my tests,..

  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to run QTP from QC in a local folder?

    The following code will help you in running QTP scripts from QC, however you will need to have access to write Code in the Script Editor of QC.

    NOTE: This code may require changes to suit your needs. I wrote this code to run my test by passing some parameters.

    Function InvokeQTP(TestName)
    Dim pDefColl 'As QuickTest.ParameterDefinitions ' Declare a Parameter Definitions collection
    Dim pDef ' As QuickTest.ParameterDefinition ' Declare a ParameterDefinition object
    Dim rtParams 'As QuickTest.Parameters ' Declare a Parameters collection
    Dim rtParam ' As QuickTest.Parameter ' Declare a Parameter object
    'Dim cnt, Indx As Integer
    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
    qtApp.Launch ' Start QuickTest
    qtApp.Visible = True ' Make the QuickTest application visible
    qtApp.Open "Your Test Script name with full patch ex C:/myQTP/testcases",true
    ' Retrieve the parameters collection defined for the test.
    Set pDefColl = qtApp.Test.ParameterDefinitions
    cnt = pDefColl.Count
    Indx = 1
    ' Display the names and values of each of the parameters in the collection.
    While Indx <= cnt
    Set pDef = pDefColl.Item(Indx)
    MsgBox "Param name: " & pDef.Name & "; Type: " & pDef.Type & "; InOut: " & pDef.InOut & "; Description: " _
    & pDef.Description & "Default value: " & pDef.DefaultValue
    Indx = Indx + 1
    Wend
    Set rtParams = pDefColl.GetParameters() ' Retrieve the Parameters collection defined for the test.
    Set rtParam = rtParams.Item("Param1") ' Retrieve a specific parameter.
    rtParam.Value = "Hello" ' Change the parameter value.
    qtApp.Test.Run , True, rtParams ' Run the test with changed parameters.
    'qtApp.Environment("Keyword") =TestName
    Set qTest=qtApp.Test
    qTest.run

    End Function

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:23 PM.

Copyright BetaSoft Inc.