Any Action after TestSuite finishes

Class library usage, coding and language questions.
RWitanski
Posts: 7
Joined: Fri Sep 16, 2016 4:10 pm

Any Action after TestSuite finishes

Post by RWitanski » Fri Sep 16, 2016 4:28 pm

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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Any Action after TestSuite finishes

Post by odklizec » Mon Sep 19, 2016 1:02 pm

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 ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration