Hello
Using Ranorex 7.2
I've worked out how to use the automation helpers to convert the report to a PDF and use the Send Email helper - inserting User Code into a module so that I Send-Email as command to attach the PDF - to send it in an email with an attached PDF.
The above I do in the tear down section.
What I would really like to do is only send the email on failure but this is really alluding me - the justification is my Manager only wants to see the failures . Does anybody have a way do doing this?
Thanks.
Ranorex 7.2 - Send Email/PDF Only On Failure
-
- Posts: 13
- Joined: Thu May 05, 2016 10:16 am
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex 7.2 - Send Email/PDF Only On Failure
Hi Wayne,
You can do this by adding the following line just below Report.End(); in the EmailModule
[/color]
UPDATE: See my post below on the new proper method to achieve this.
Cheers,
Ned
You can do this by adding the following line just below Report.End(); in the EmailModule
Code: Select all
if (Ranorex.Core.Reporting.TestReport.CurrentTestSuiteActivity.TotalFailedTestCaseCount > 0)
return;
UPDATE: See my post below on the new proper method to achieve this.
Cheers,
Ned
-
- Posts: 13
- Joined: Thu May 05, 2016 10:16 am
Re: Ranorex 7.2 - Send Email/PDF Only On Failure
Will test it - Thanks
Re: Ranorex 7.2 - Send Email/PDF Only On Failure
The EmailModule seems to have changed - could someone comment on where that code snippet is supposed to go now? (I guess (1) or (2)?)
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex 7.2 - Send Email/PDF Only On Failure
Hi loonquawl,
The above code is obsolete as this feature has since been implemented as a bound variable. Simply set "SendEmailOnFailure" as True and "SendEmailOnSuccess" as False to email the report only on failure.
Cheers,
Ned
The above code is obsolete as this feature has since been implemented as a bound variable. Simply set "SendEmailOnFailure" as True and "SendEmailOnSuccess" as False to email the report only on failure.
Cheers,
Ned
You do not have the required permissions to view the files attached to this post.