cancel
Showing results for 
Search instead for 
Did you mean: 

Testcomplete + sending the log by email if there is failure

Highlighted
Super Contributor

Testcomplete + sending the log by email if there is failure

has anyone sent the email from Testcomplete script if there is error or failure ?

 

Thanks

Nishchah

16 REPLIES 16
Community Hero

Re: Testcomplete + sending the log by email if there is failure

A log is a log - did you try it and have a problem?

Super Contributor

Re: Testcomplete + sending the log by email if there is failure

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 

Community Hero

Re: Testcomplete + sending the log by email if there is failure

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. 

Super Contributor

Re: Testcomplete + sending the log by email if there is failure

@Marsha_R 

 

I have attached the 2 screen which contain the information .

 

Let me know if you need more information 

Super Contributor

Re: Testcomplete + sending the log by email if there is failure

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

 

Community Hero

Re: Testcomplete + sending the log by email if there is failure

Super Contributor

Re: Testcomplete + sending the log by email if there is failure

I have seen this . But there is a condtion we need to trigger the email if there are errors in the log.

Community Hero

Re: Testcomplete + sending the log by email if there is failure

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Super Contributor

Re: Testcomplete + sending the log by email if there is failure

@tristaanogre 

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.

New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win