Page 1 of 1

Email Test Result / Schedule A Run

Posted: Mon Dec 14, 2009 7:52 pm
by ohm
Is there any way to send an email attaching the test result when the test ends? I have looked into the forum. I found a post where it says using system.net.mail. But how? Could you please explain it?

Also can you schedule the test to run at a particular time of the day automatically?

Thanks in advance.

Re: Email Test Result / Schedule A Run

Posted: Mon Dec 14, 2009 9:32 pm
by Support Team
There are lots of code samples for sending emails using the System.Net.Mail namespace on the web. A quick google search got me the following website which nicely explains all the classes needed and provides code samples:
http://www.systemnetmail.com/

The following code sample should work for you, you just need to change the SMTP server address:
http://www.systemnetmail.com/faq/2.4.aspx

For scheduling tests you can either use a Continous Integration system, like CruiseControl for .NET (CCNet), or use the Windows integrated task scheduler to execute tests at a defined time. Please read the following forum post on how to set up Ranorex tests in CCNet:
http://www.ranorex.com/forum/post1744.html

Regards,
Alex
Ranorex Support Team

Re: Email Test Result / Schedule A Run

Posted: Tue Dec 15, 2009 5:28 pm
by ohm
Thanks Alex.
I will take a look.