Ask a Question

JavaScript Runtime Error Exit Code in Test Execute

Occasional Contributor

JavaScript Runtime Error Exit Code in Test Execute

I have quite a large testing set of tests running overnight during our software cycle, these tests are set up to run one after the other with various exit codes as fail safes.


Unfortuantly when we do have bugs in the software build we sometimes get JavaScript Runtime Errors. These stop the entire run of the automated tests and don't get caught by any of the usual TestExecute Exit Codes. They also don't get overwritten when using /timeout:. Hence an early JavaScript Runtime Error and we lose an entire night of testing. Is there a good way to get around this?  


Many of the newer tests are written to minimize this by checking for objects first, but it would be great to not have to go back through and rewrite many of the older tests

Community Hero

A few things you can do.


One is implement try / catch / finally blocks in your JS code to catch these and log stack trace.


Are your tests setup as test items? If so there are setting you can apply to your test items page and project properties to not stop the entire project on a exception. 


Click the Accept as Solution button if my answer has helped
Showing results for 
Search instead for 
Did you mean: