Sending an email of Test Results

Ask general questions here.
jchou
Posts: 26
Joined: Tue Apr 24, 2012 11:19 pm

Re: Sending an email of Test Results

Post by jchou » Tue Nov 20, 2012 10:15 pm

Will do. Thanks, Markus.

Joe

jchou
Posts: 26
Joined: Tue Apr 24, 2012 11:19 pm

Re: Sending an email of Test Results

Post by jchou » Tue Dec 18, 2012 3:46 am

Hi Markus,

Got a new question about emailing test results. We have a need to use different receiver email address (who would receive test result email) in different test environments. What would be a flexible way to do that when I run .exe from command line? Should I pass the email address in as an argument? If so, should I use the global parameter option (/pa:receiverEmail="[email protected]")? Do you have a sample code to retrieve the parameter argument in main()? Looks like I need to follow the Ranorex convention of doing it, don't I? Your suggestions would be highly appreciated.

Thanks.

Joe

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sending an email of Test Results

Post by Support Team » Tue Dec 18, 2012 3:19 pm

Hi,

I would just pass it as argument, you can do it as you would do it with "normal" C# applications.
The "args" array will then contain the arguments passed, like the email address.

Regards,
Markus

jchou
Posts: 26
Joined: Tue Apr 24, 2012 11:19 pm

Re: Sending an email of Test Results

Post by jchou » Wed Dec 19, 2012 1:21 am

Thanks, Markus. That's exactly what I did, and it seems to work fine.

pramoodd
Posts: 13
Joined: Tue Mar 26, 2013 8:45 am

Re: Sending an email of Test Results

Post by pramoodd » Fri Mar 29, 2013 2:17 pm

Hi,
I tried using the mail logger code(The code attached earlier).
I even tried the compression suggestion.
BUt Mail is not send .
IN Maillogger.cs
I changed the HostName:smtp.gmail.com;
Changed the Port to port = 465;

and in program.cs,
I passed my mail ID (from),(Onemore mail ID), and the same subject(Didnt change any) to MailLogger object. (Ln:35)
(Plz check attachment)

While running I am getting a error.(Plz see Attachment)
Did I miss any?
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sending an email of Test Results

Post by Support Team » Tue Apr 02, 2013 2:46 pm

Hello,

Could you please verify if SSL is enabled in your settings?
Please take a look at the code snippet below:
client.Credentials = basicCredential;
client.EnableSsl = true;
client.Send(mail);
Thank you in advance.

Regards,
Markus (T)

will
Posts: 18
Joined: Tue Jan 26, 2010 11:29 am

Re: Sending an email of Test Results

Post by will » Tue Nov 26, 2013 9:58 am

Support Team wrote:Hi,

You find the setting in the properties window of the test suite, see attached screenshot.
ZippedReport.png
Regards,
Markus
Ranorex Support Team
Hi, Markus

I can't find the option in my Ranorex(Version 3.0.5), so what should i do now? I want to mail the report with an attachment. Is there another way to do this?

Thanks
Will

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sending an email of Test Results

Post by Support Team » Wed Nov 27, 2013 2:14 pm

Hello Will,

We have provided the possibility to store reports in a compressed format since Ranorex 3.3.x.
Please take a look at our Release Notes.

I would recommend to update to Ranorex 3.3.5 or Ranorex 4.1.2 (current version).
You may download Ranorex from our Download Archive.

Regards,
Markus (T)

BorisS
Posts: 14
Joined: Fri Jul 11, 2014 2:25 pm

Avoiding Teardown Module

Post by BorisS » Fri Aug 15, 2014 2:32 pm

Are there any way to avoid adding teardown module to every test case?

Out solutions have many test cases in a single project. I would prefer to make this work once in the program.cs file after execution of the Run method. Is there any way to run over all performed testcases and make a check of their exit status?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sending an email of Test Results

Post by Support Team » Tue Aug 19, 2014 2:30 pm

Hello Boris,

Unfortunately it’s not possible to check the status of all TestCases using our documented API.
Thank you for your understanding.

Regards,
Robert

riagarwal
Posts: 19
Joined: Thu Aug 27, 2015 3:44 pm

Re: Sending an email of Test Results

Post by riagarwal » Fri Oct 30, 2015 4:29 pm

Hello,

I am trying to implement the solution that you have given for sending an email for the reports.
When I run your solution, it runs fine and I am able to receive the email.

however, when i implement those files in my existing project which is in (VB.NET) then it is not working as the project that you have given is in C#.

I am having issues in making that C# project in VB.NET, is it possible for you to please provide the equivalent project for email in VB.NET..

Thanks,
Ritesh Aggarwal

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Sending an email of Test Results

Post by Support Team » Tue Nov 03, 2015 8:36 am

Hello Ritesh Aggarwal,

Unfortunately, the 'CustomLogging'-sample is only available as a C# project.

If you need to implement your solution in VB.NET, then you could convert the C# project to a VB.NET project easily.

Please open the project in Ranorex Studio and use the function 'Convert from C# to VB.NET'.
convert_project.png
Please let me know if you need further assistance.

Regards,
Johannes
You do not have the required permissions to view the files attached to this post.