Forum Discussion

smskrishna's avatar
smskrishna
Occasional Contributor
14 years ago

Error in step that has a function call

Hi,



I am currently using TestComplete 6.5 , I have written reusable functions in different units and using them in testcases when ever required. Some times I have to use the same function many times(with different data) in a single testcase . As part of my test execution I will pass random data(some invalid data also) to the function ,so after execution I will get the error messages in the result log .When I double click on the the errr messgae in the log, the testcomplete is taking me to the function which is causing the error rather than navigating to the step where function is called. Is there any option to be set to navigate to test but not to function where the error occured. If this option is not present I would suggest to provide the option of navigating to test step fro the result log, then tester can decide whether to visit the function are can change the value passed to the function. This would redue the debugging time especially while dealing test case that has huge number more test steps anf function calls. Also I would suggest line numbers to be displayed next to message in the result log which again will help tester to directly go to the respective line.



Please let me know if these options already existing in testcomplete, If not I hope you will consider my suggestions

3 Replies

  • ChrisH's avatar
    ChrisH
    Occasional Contributor
    You could try wrapping your function call inside a log folder.  The error message from within that function call would tell you what went wrong, but to navigate to the originating function you'd double-click on the log folder in the log rather than on the actual error message, if you see what I mean.



    JScript:



    Log.Append("Test case 1...");

    OtherFunction(data);

    Log.PopLogFolder();



    Log messages in "OtherFunction" will be grouped together.  If you double-click the "Test case 1..." item in the log it takes you back to the code above, rather than the bit inside "OtherFunction" where the error occurred.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Siva,



    Doesn't Call Stack functionality of the log pane meets your needs? (See the "Call Stack Panel" help topic for more details.)
  • Hi,


    You can view the information you need in "Call stack" panel of the log. It shows the list of function calls and the line# where the problem occured. You can simply double-click the necessay function there and you'll be directed to appropriate line.