Forum Discussion

AlexKeil's avatar
AlexKeil
New Contributor
13 years ago

Warning/Errors not in Logs

Odd question, ive been using Test Complete for a little while now, ive found that recently certain errors and warnings no longer show in the Script Test Log. Working mainly with scripts at the moment.



For example, one part of a script connects to a database, for example:


Conn["ConnectionString"] = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=<Database>;Data Source=<Instance>";



Now initially while i was writing this, if i put in the Instance name incorrectly, i would get an error in the Script Test Log stating that database xxxx could not be found.



Recently, if the instnace name is incorrect, the script runs for a while, then just shows the Script test log, showing no errors or warnings at all. I have all the filters ticked (error, warning, message, event, checkpoint).



Any help would be much appreciated =)



THanks!




  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    That is curious.



    Question:  Has anyone added an "OnLogError" event handlers to the project that may be trapping the error and removing it?
  • AlexKeil's avatar
    AlexKeil
    New Contributor
    Hi! THanks for your reply.

    I had tried to add an OnLogError Event Handler to try to see if that fixed it! The project is pretty small at the moment, and we dont have any custom event handlers at the moment.

    I also tried changing the Stop On Error settings (warning, error etc).

    I had also tried changing the settings for how many logs are stored, but that didnt seem to do anything.



    I went to the stage of creating a new project, and just putting in one script that assigns the connection string and then tries to connect. On the Conn.Open() method, Test Complete just loads for a bit, and then presents the logs, with no messages at all (the connection string has the incorrect name of an Instance in it).

    If i correct the instance name, open the connection and perform a simple query (ie log a table name), that shows in the logs.



    Does Test Complete need any integration for these types of logs? I used to have Visual Studio installed on this PC, but didnt need it anymore so i removed it. I have also recently re-imaged my PC.



    Any furthur thoughts would be great!


  • Hi Alex,





    I tried copy-pasting your code (the code you sent to us via the Contact Support form) into a sample TestComplete project and an error message appeared as expected. This makes me think that the difference is either in the code (are you sure you ran exactly the same routine?) or in the environment. What happens if you try running the problematic script in debug mode, line by line?


  • AlexKeil's avatar
    AlexKeil
    New Contributor
    Hi.

    Thanks for all your help, in the end we re-installed Visual Studio, and the errors returned. So i guess i needed some sort of script de-bugger installed. I did notice that Test Complete kept suggesting i install MSD, but when i followed the link, it took me to a site that suggested that the windows MSD was no longer supported.



    All good now!



    THanks!

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    The MSD that they have listed as "not supported" still works just fine.  Go ahead and install it and you should be good.