Email Test Result / Schedule A Run

Ranorex Spy, Recorder, and Studio.
ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Email Test Result / Schedule A Run

Post by ohm » Mon Dec 14, 2009 7:52 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Email Test Result / Schedule A Run

Post by Support Team » Mon Dec 14, 2009 9:32 pm

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
.
Image

ohm
Posts: 27
Joined: Thu Dec 03, 2009 7:27 pm

Re: Email Test Result / Schedule A Run

Post by ohm » Tue Dec 15, 2009 5:28 pm

Thanks Alex.
I will take a look.