Global parameters - status of report

Ask general questions here.
rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

Global parameters - status of report

Post by rsudhak » Thu Jun 13, 2019 1:47 pm

Hi All,

how can I add the status of the report in the subject in global parameter when using automation helper email module

Thanks,
Rajee

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

Re: Global parameters - status of report

Post by odklizec » Fri Jun 14, 2019 9:31 am

Hi,

Basically, you can use this code to get the status of test suite:

Code: Select all

var tcStatus = Ranorex.Core.Reporting.ActivityStack.Current.Status; // returns test suite status
Simply use this code right before SendEmail method and fill the subject parameter with anything you want, including test status. Hope this helps?
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

rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

Re: Global parameters - status of report

Post by rsudhak » Fri Jun 14, 2019 3:31 pm

works absolutely fine, thanks. Is there a way to get the current test status, like how many tests were run, how many passed and how many failures?

User avatar
qwertzu
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: Global parameters - status of report

Post by qwertzu » Tue Jun 18, 2019 9:10 am

hey,

You could read the status of each test cases or smart folders of your test with this line:

Code: Select all

TestSuite.Current.GetTestContainer("<TestCaseName>").Status;

regards, qwertzu