Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
What language of script are you using? Or are you using a Keyword Test?
Essentially, if you're not using some sort of built-in exception handling in your test and your "send mail" is just one more "step" in your test project, if your project fails and stops execution, it will never get to the line for sending the e-mail.
In a "previous life", we created a routine that would, upon execution, e-mail the log when called. We then wrapped calls to that routine within try/catch/finally logic so that, even if a test failed, it would still execute the send mail.
In other words, it's an architecture problem in that you need to put your call to send the e-mail at a point that will always send such as in exception handling code, TestComplete Events, etc.
Essentially, if you're not using some sort of built-in exception handling in your test and your "send mail" is just one more "step" in your test project, if your project fails and stops execution, it will never get to the line for sending the e-mail.
In a "previous life", we created a routine that would, upon execution, e-mail the log when called. We then wrapped calls to that routine within try/catch/finally logic so that, even if a test failed, it would still execute the send mail.
In other words, it's an architecture problem in that you need to put your call to send the e-mail at a point that will always send such as in exception handling code, TestComplete Events, etc.