How to catch java script errors in web application testing?
|
|
|
|
|
One of the most tedious tasks in web applciation development and testing is catching any java script
errors thrown by your application's pages. The frustrating part is that you spend lot of QA
cycles in testing your web application and the day the application is released to customers or
users, immediately people start complaining that theie browser is displaying error dialog box complaining about
some java script errors. And now you are wondering how is this possible when this whole application was
testing very carefully and everything worked.
A lof times these java script errors are not serious enough or are such that they do not cause any
functionality issues in your application but there were some error messages in the status messages in the
status bar which you probably ignored like most of users like me. So issue got masked and application
sailed through QA process.
There is a way to prevent these issues to escape your testing. Internet Explorer provides advanced settings
where you can turn on and off some options to make it work. Following image shows what typical settings
may look like in Tools > Internet Options > Advanced Settings in IE.
Notice the options about Java Script Debugging and error display. Typically debugging options are turned off
and error notification is turned off too. This is the reason that java script errors go unnoticed. You need to
enable java script debugging from here and turn on error display. This way you are all set to catch all
javascript errors. After you make the required changes, your advanced options dialog box may look the
following image.
|