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
    Aug 2007
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    storing all the result in one folder only

    Hi,

    I had a concern that i used some 10 xml check point,and i will get different result for all the 10 check point . So i want single result for all those check points.

    Regards
    Vinod Jaju

  2. #2
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing all the result in one folder only

    Let me get this right... you have 10 xml checkpoints and you want to store them in one place? Should they not already be stored in one place? or have I got something wrong? Anyone else?....
    I like what i know and I know what i like

  3. #3
    Junior Member
    Join Date
    Aug 2007
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: storing all the result in one folder only

    Hi,

    My script is some thing like this .


    Dim xl,wbook,var,var1,var2
    Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
    Dim qtUpdateRunOptions 'As QuickTest.UpdateRunOptions ' Declare an Update Run Options object variable

    Function SendMail(SendTo, Subject, Body)
    Set ol=CreateObject("Outlook.Application")
    Set Mail=ol.CreateItem(0)
    Mail.to=SendTo
    Mail.Subject=Subject
    Mail.Body=Body
    Mail.Send
    ol.Quit
    Set Mail = Nothing
    Set ol = Nothing
    End Function


    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
    Set qtUpdateRunOptions = CreateObject("QuickTest.UpdateRunOptions") ' Create the Update Run Options object
    Set xl = CreateObject("Excel.Application")
    xl.Visible = false
    Set wbook=xl.Workbooks.Open ("C:\Mitchell Medical\Inputs.xls")
    wbook.Worksheets("Sheet1").Activate
    xl.ActiveSheet.UsedRange.Select
    rc = xl.Selection.Rows.Count

    qtApp.Launch ' Start QuickTest
    qtApp.Visible = True
    qtApp.Open "C:\Mitchell Medical\QTPTest"
    i=2
    Do While i <= rc
    var=wbook.Worksheets("Sheet1").cells(i,1).value
    var2=wbook.Worksheets("Sheet1").cells(i,2).value
    pos1=Instrrev(var2,".xml")
    pos2=Instrrev(var2,"\",pos1)
    Rname="Check_"&mid(var2,pos2+1,pos1 - pos2-1)
    qtUpdateRunOptions.UpdateActiveScreen = False
    qtUpdateRunOptions.UpdateCheckpoints = True
    qtUpdateRunOptions.UpdateTestObjectDescriptions = False
    qtApp.Test.Environment.Value("var1") = 1
    qtApp.Test.DataTable.Value ("Filename", "Action1")= var
    qtApp.Test.UpdateRun
    qtApp.Test.Environment.Value("var1") = 2
    qtApp.Test.DataTable.Value ("Filename", "Action1")= var2
    Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
    qtResultsOpt.ResultsLocation = "C:\Mitchell Medical\Result\"&Rname ' Set the results location
    qtApp.Test.Run qtResultsOpt
    qtApp.Test.Environment.Value("var1") = 1
    i=i+1

    RunResults=qtApp.Test.LastRunResults.Status ' Check the results of the test run

    if RunResults ="Failed" then
    sendTo=Inputbox("Enter to whom the mail to be sent (like: )
    If sendTo = "" Then
    else
    SendMail sendTo, "Checking File - "&Rname, "Error found in comparison of "&Rname&" View the complete result using qtp test reslt viewer"
    end if

    end if
    Loop
    xl.Quit
    Set xl = Nothing
    qtApp.Test.Save
    qtApp.Quit ' Exit QuickTest
    Set qtUpdateRunOptions = Nothing ' Release the Update Run Options object
    Set qtApp = Nothing ' Release the Application object
    Set qtResultsOpt = Nothing




    and the QTP Test is

    this is action 3

    MyValue=Environment.Value("var1")
    Select Case MyValue
    Case 1
    'To run in Update Run mode
    RunAction "Action1"
    Case 2
    'To run in Run mode
    RunAction "Action1"
    End Select

    and action 1 is


    XMLFile("N10.xml").Check CheckPoint("N10.xml")
    'Set var_GetData = XMLFile("N10.xml").GetData()
    'msgbox var_GetData



    i am passing xml file thru excel sheet and in the abovescript i am able to get the diff result for diff xml.

    so i want all in same result


    Regards
    Vinod jaju

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: storing all the result in one folder only

    YOu would need to write you custom code to do that. QTP will not provide you a direct solution for this. No Pain No Gain

 

 

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 11.54%
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 10:24 AM.

Copyright BetaSoft Inc.