Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current Line in Execution
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hey guys,

I'm having a problem where my script is hanging up during run time. I call all my functions from a function library and my test only consists of function calls, so I cant see exactly what line of execution my script is on. Is there a way (Im assuming a possible command from the command line) so ask QTP what line its on during runtime?

Thanks
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
you can still load the function library in QTP and place a "breakpoint" on any line of the function to pause execution and use the debug or watch panels to see what information your test is working with.

You can also press F11 to execute the test instead of F5. Continue to press F11 for each line of code and it will follow execution into the library.

hope this helps.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
yeah, I know how to do that the issue is I'm working through a business workflow where this error occurs 45min into the test, and the function that its showing the error is in one of the biggest functions (~300 lines long). Any other ideas?
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Ah. Best advice I can give for those situations is to create a log file and put a log entry every 10 or so lines. At least that way you can narrow it down to a few lines of code based on the last log entry. You can use the Reporter.ReportEvent command, but I don't know if QTP shows the results for you when the test stops. if it does, use that event to make "log" entries to see what executed last. Otherwise, use the FSO to create a text file on the hard drive and write log events to it.

Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Ok got it, so how do I create a txt file that logs everything using the FSO?
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Why not use msgbox in the function file and then use watch to find the variation in your variables?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
Please find the file "Scripting QTP -Working with Files.pdf" it will help you to create edit and delete the files/folders


J112910f hope u got the file "Scripting QTP -Working with Files.pdf"


Attached Files
.pdf   Scripting QTP -Working with Files.pdf (Size: 1.23 MB / Downloads: 1,593)
Reply
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
You can also log the timings in log file to see the difference
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 928 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Grab multiple line data from log file haziqwebs 0 1,792 10-19-2016, 01:28 PM
Last Post: haziqwebs
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,057 12-20-2013, 01:44 PM
Last Post: sshukla12
  Select Current Date from a Calendar Control qtpbeginner78 11 25,393 06-04-2013, 05:38 AM
Last Post: qtpbeginner78
  .Sync is NOT waiting for browser to complete current navigation.. can anyone help? mansis 4 4,593 09-14-2012, 06:53 PM
Last Post: mansis

Forum Jump:


Users browsing this thread: 1 Guest(s)