Page 1 of 1

Any Action after TestSuite finishes

Posted: Fri Sep 16, 2016 4:28 pm
by RWitanski
Hello,

Im trying to send generated PDF report from Test Suite as email.
As I discovered I cannot use any UserCode or CodeModule after the ReportPDF module, since the PDF document is generated when the Test Suite is finished.
Is there any workaround to do so?

Thank You,
RW

Re: Any Action after TestSuite finishes

Posted: Mon Sep 19, 2016 1:02 pm
by odklizec
Hi,

I would suggest to use SendMail module as a very last action in Program.cs (just before 'return') and even better, use these two lines before calling SendMail module, to make sure the report generation is finished:

Code: Select all

	Ranorex.Core.Reporting.TestReport.EndTestCase();
	Ranorex.Core.Reporting.TestReport.SaveReport();
Eventually, check the SendMail with PDF attachment post here:
http://www.ranorex.com/forum/send-mail- ... tml#p35760

To be quite honest, I would suggest to setup a proper continuous integration system (like Jenkins) and keep all artifact files on server and send people only a notification email with links where they can examine/download the report files. PDF reports could be quite big and sending huge files via email can quickly flood recipients inbox ;)