Debug QTP scripts

Question ID: 104620
2
0

Does anybody have suggestions for debugging a script that crashes QTP and AUT? I am not sure which line of the code is causing the problem. Running in debug step mode does not cause the problem. Another part of the problem is it takes over 15 minutes of running the test script to get to area of test where the crash occurs. Does anybody have suggestion on how I can find what line is causing the problem beside with out many test runs.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Asked on October 1, 2012 11:20 am
14 views
Answers (1)
8
Private answer

I have used the QuickTest Print Log for trouble shooting. This displays information in the QuickTest Print Log window during the run session. The QuickTest Print Log window remains open while the run session continues, until you close it.

The QuickTest Print Log is stored at %Temp$QTPrintLog.txt and you can use it to find location of errors.

I have created a function library for debugging which does help out.


Function   myDebug(myMsg)
	If debugMode then
		print now &''  '' &  myMsg
	End if
End Function

debugMode=false
' line of code
'line of code
myDebug('' test  line 2'')
'line of code
zVar=12 
myDebug ( '' zVar= '' & zVar)
Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on October 1, 2012 11:34 am