(The codes present in the snapshots are all available at the bottom, the snapshots are provided only for your better understanding)
To understand the difference between Step Into, Step Out and Step Over, create a new Test and associate one library which has function for addition of two numbers (as given below). Initiate a call to the function in libarary from test action as below and insert breakpoint at the line where call to the function is written.


Now let us get to the differences:
1) Step into
1. Run the test and it will pause on the function call and then press F11 i.e. step into it will run the single line statement and pause to the first line of function i.e. line 3.

2. After pressing F11 again line 3 of function gets executed and cursor pauses at line 4.
3. After pressing F11 again line 4 will get executed and result message will be displayed and pauses on line 6 i.e. “End Function”
4. Now, pressing F11 yet again will take you to the calling action and execute the next line which will be Wait(1) and pause there.
Conclusion:
Step Into is used for executing a single statement at a time, if that statement is a function call or action call then it will step into that function or action and called function or action will be displayed in QTP window and run pauses at the first line of the called function.
2) Step Out:
1. Run the test and it will pause on the function call and then press F11 i.e. step into it will run the single line statement and pause to the first line of function i.e. line 3.

2. After pressing Step Out (Shift+F11) all the remaining lines of function i.e. line 3 and line 4 get executed and cursor returns to test action next line after function call.

Conclusion:
Step Out is used for executing all the remaining statement in that function call or action from the position of cursor. Step out runs the local function entirely but if the function calls other function step out just pause to the first line called function.
Step Over:
1. Run the test and it will pause on the function call and then press F10 i.e. step over it will run called function entirely but does not displayed while running and cursor returns to Test action next line after function call

Conclusion:
Step Over is used for executing a single statement and if that statement is a function call or action call then it will execute the complete block of statements once present in the function/action and called function or action is not displayed in the QTP window.
excellent way of explaning.... this clears the difference thank you.
ReplyDeletesuperb....great explanation..Thanks a lot...
ReplyDeleteThanks...
ReplyDeleteExcellent....
ReplyDeleteGood way to explain thanks
ReplyDeleteAwesome explanation yaar... Thank You sooooo much...
ReplyDeleteGreat explanation..Thanks a lot.
ReplyDeletethanks .. good explanation
ReplyDeleteThanks
ReplyDeleteThanks a lot for the explanation..From many Days, I was not understanding the exact difference between these Runs.Today my doubt got cleared.
ReplyDeleteNice Explanation... Thanks a lot... This clears my doubt...
ReplyDeleteExcellent explanation...
ReplyDeleteThanks a lot
ReplyDeleteThanks...it's a lot helpful
ReplyDeleteGood Explination
ReplyDeletegood one which cleared my confusion..
ReplyDeletegood explanation which cleared my doubts
ReplyDeleteIn my QTP 10.0 trail version debugging mode not working, plz help me anyone...
ReplyDeleteIs there any Crack to Activate Kindly provide me that too... plz...
Email : nagendra.eenadi@gmail.com