Page 1 of 1

TestSuite fails but activitystack status show success

Posted: Tue Jul 16, 2019 5:19 pm
by karltinsly
I have a bit of usercode in my teardown that is reporting in a text file log the results of Ranorex.Core.Reporting.ActivityStack.Current.Status.ToString(). Regardless of whether the test suite has failed or not (as reported in the .rxlog), the status returns Success.

I have one test case with several smart folders that are set to stop on fail. If one of the folders fails, the ranorex report shows a big red pie, but my captured activitystack status still say Success.

Am I not understanding what the status should be returning?

Thanks!

Re: TestSuite fails but activitystack status show success

Posted: Tue Jul 16, 2019 5:49 pm
by odklizec
Hi,

At first, what Ranorex version do you use? Most recent version is 9.1.1. If you are using something older, please update it. At next, where exactly is placed the code you are using? Make sure it’s called near the end of test, ideally, as a last action before ‘return’ in program.cs.

Re: TestSuite fails but activitystack status show success

Posted: Tue Jul 16, 2019 8:34 pm
by karltinsly
Thanks for your reply. I'm on version 9.0.1. We are not ready to upgrade yet. Hopefully this is not an issue that can only be resolved by upgrading.

The usercode that is capturing the test suite status is in the teardown - the very last module before sending an email through the automation helper.

Re: TestSuite fails but activitystack status show success

Posted: Wed Jul 17, 2019 7:59 am
by odklizec
Hi,

I don't know why, but TestSuite TearDown doesn't seems to be a correct place for collecting Test Suite status. I believe it's because the Test Suite is, technically, not finished yet at a time of calling the 'status' code? So if you want to collect the TS status, you must do it in Program.cs, ideally, right after Run action. Which means, you will also have to call the sendmail from there? ;)
TSStatus.png

Re: TestSuite fails but activitystack status show success

Posted: Wed Jul 17, 2019 1:54 pm
by karltinsly
Okay, thank you.