has anyone sent the email from Testcomplete script if there is error or failure ?
Thanks
Nishchah
Solved! Go to Solution.
Finally Support Team has resolved the issue in TestCOmplete 14.20. If we want to export the log of current TestITems in MHT format then we can use the following function
Log.SaveResultsAs(outfile, lsMHT, true, 2);
A log is a log - did you try it and have a problem?
I did not get it .
I have a project . In the project i have 3-4 scripts . Once the script finished running . After that if there are errors then how can we ask testcomplete to send the email . if there are no errors then we do not want to send the email
Show us the steps you tried to send the email when it failed. It's hard to try to find an answer when we don't know what you are doing.
I have attached the 2 screen which contain the information .
Let me know if you need more information
I haven't started using the email functionality . I am checking for sendEmail functionality but that require to have our mail server information
ALso I am sharing the some more information
1 Under the project we have 4-5 script . If any one script fails then it stop the current
script and move on another script. We have implemented this OnLogError.
2. Once all the script finished running. Then we export the MHT report to our project location .
Now our next step is to trigger the email if there are failures or errors in the project .
Let me know if you need more information
Thanks
Nishchal
I have seen this . But there is a condtion we need to trigger the email if there are errors in the log.
What I would do is, in your OnLogError handler, set the value of a global project boolean variable to true if an error is logged. Then, at the end of the project, just add some if-then logic to a "clean up" routine that, if that flag is true, send the e-mail.
Thanks for the updates
Here is some more issues besides email.
I am runing 2 project Items. When those testItems throw error we have error events triggered which stop the current testItem and then move to the next item. We are also trying to export the MHT report for the current projectItem when the error appears. For e.g. When one project Item start running and if there is error then error onlog handler event is called. At the same we want to export the MHT report. and then it move to the next projectItem and if the error occurs then same process . if no error then no MHT report.
I have attached the whole process in pdf file.
Let me know if you need more information
Thanks
Nishchal
I have attached the screenshot in pdf. MHT report get mixed up.
Subject | Author | Latest Post |
---|---|---|