Forum Discussion

chicks's avatar
chicks
Regular Contributor
13 years ago

Call Stack not available



My understanding is that by default TestComplete creates a call stack for error messages.   When you click on an error message, it takes you directly to the code.



a) this does not happen for me in any of my projects.  I can click / double-click / whatever on an error message and nothing happens.

When I open the call stack panel it is empty.  The headers are there, but the fields are empty.



b) I created an event handler to turn on the call stack for everything.    Here's the code:

function GeneralEvents_OnStartTest(Sender)

{



 // Enable call stack tracing

Log.CallStackSettings.EnableStackOnWarning = true;

Log.CallStackSettings.EnableStackOnCheckpoint = true;

Log.CallStackSettings.EnableStackOnEvent = true;

Log.CallStackSettings.EnableStackOnLink = true;

Log.CallStackSettings.EnableStackOnMessage = true;  

}



I confirmed that this routine does get called by putting a Log.Message("on start test event was called")

My callstack is still not available.



I'm guessing there's a project or project suite setting somewhere that needs to be enabled or disabled, but have not found anything.



Advice or suggestions would be greatly appreciated.   

Regards,

Curt Hicks

8 Replies

  • chicks's avatar
    chicks
    Regular Contributor
    That worked!   I downloaded from the link specified in the article although the site said it was deprecated.



    It would be nice if the SmartBear call stack documentation mentioned that the debugger was required.  Perhaps this thread will help.



    Thank you very much for your help Robert. 



    Regards,  Curt
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Are you running your tests using TestExecute?  If I remember correctly, call stack logging is only supported through TestComplete. Logs generated under TestExecute will not have the Call Stack no matter what settings you call.
  • chicks's avatar
    chicks
    Regular Contributor
    Nope.  I'm using TestComplete enterprise version 8.5.    Thanks.....
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Using TestComplete 8.60 and JScript, I created a unit with the following code



    function Test1()

    {

    Log.Error("This is test1")

    }





    function Test2()

    {

    Test1()

    }





    function Test3()

    {

    Test2()

    }





    function Test4()

    {

    Test3()

    }




    When I run Test4, I get the CallStack show in the attached screenshot.



    Have you tried upgrading to TC 8.60?  What sort of code are you running that's generating errors that should be getting the call stack?  
  • chicks's avatar
    chicks
    Regular Contributor
    I copied your code and got no call stack.  See the attached picture.



    My coworker is using 8.5 as well and not having any problems.



    I'm verifying objects on webpages....
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Are you and your co-worker executing the same code?  Do you have the MS debugger installed on your machine?  I think the call stack feature is dependent upon whether or not you can debug code.  Check out the link http://smartbear.com/support/viewarticle/11360/ 



    Other than that, I know of no settings within TestComplete that turns on or off the ability to do a call stack.
  • chicks's avatar
    chicks
    Regular Contributor
    I do recall trying to use the debugger some months ago and it not working.  I will check into this....



    Thanks!
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    That the Call Stack requires the debugger does seem rather hidden in implications in the help files.  That would probably be something that needs clarified.  



    You should be able to see breakpoints working now, too.