SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to handle manual Stop

    Hi,

    I have a requirement like i need to upload my data table at the end of the test as one excel.But i am seeing a risk, when a person clicks on Stop button in QTP, every thing would be vanished in very next minute. How to handle this?? Can we write any code on Stop event??

    Thnx,
    Prasan.

  2. #2
    Super Member FredMan's Avatar
    Join Date
    Oct 2007
    Location
    Lenexa, Kansas
    Posts
    1,218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to handle manual Stop

    Upload the data prior to stopping the test.
    Onward thru the fog...

  3. #3
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to handle manual Stop

    One option could be export datatable for each iteration, or once for few iterations.

  4. #4
    Member
    Join Date
    Oct 2009
    Posts
    49
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to handle manual Stop

    Hi
    I have written sample code for the flight application. It is very simple code. Paste this code in your QTP and Execute it. While execute this script, after 4 second just click stop button. Go and see the test result in run-Time data table you can see the data

    Note : I have written this script for the flight application. you have store your F:\flight32.mdb in the F:\drive before executing.


    Dim con,rs
    Set con = Createobject("adodb.connection")
    Set rs =Createobject("adodb.recordset")
    con.provider = "microsoft.jet.oledb.4.0"
    con.open "F:\flight32.mdb"
    rs.open " Select * from orders",con
    datatable.GetSheet(1).addparameter "Order_Number",""
    datatable.GetSheet(1).addparameter "Customer_Name",""
    datatable.GetSheet(1).addparameter "Departure_Date",""
    datatable.GetSheet(1).addparameter "Flight_Number",""
    datatable.GetSheet(1).addparameter "Tickets_Ordered",""
    datatable.GetSheet(1).addparameter "Class",""
    datatable.GetSheet(1).addparameter "Agents_Name",""
    datatable.GetSheet(1).addparameter "Send_Signature_With_Order",""
    'row = 1
    Do while Not rs.EOF
    datatable.SetCurrentRow(row)
    datatable.Value (1,1)=rs.fields("Order_Number")
    datatable.Value(2,1)=rs.fields("Customer_Name")
    datatable.Value(3,1)= rs.fields("Departure_Date")
    datatable.Value(4,1)= rs.fields("Flight_Number")
    datatable.Value(5,1)=rs.fields("Tickets_Ordered")
    datatable.Value(6,1)=rs.fields("Class")
    datatable.Value(7,1)=rs.fields("Agents_Name")
    datatable.Value(8,1)=rs.fields("Send_Signature_Wit h_Order")
    row=row+1
    rs.movenext
    Loop

    Regards
    Satheesh C.M
    Attached Files Attached Files

  5. #5
    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: How to handle manual Stop


 

 

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 9.68%
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 04:27 AM.

Copyright BetaSoft Inc.