Page 1 of 1

Retrieval of test case failure (not after suite finishes)

Posted: Fri Jun 17, 2016 1:17 am
by mxdotnet
I am :? and trying to access the failure message (reason) as to why a particular test case failed (which appears in the report within the module section) and am running into limitations and wondered if anyone here has been successful with it. :evil:

Basically, I have a test suite with 3 test cases. There is a teardown method that emails us whenever that test case fails. This works perfectly. However I am limited to just the TestCaseNode.Current.Status and cant seem to find where to access the actual message which appears in the Module status such as:

00:00.229 Error Module
Failed to run application 'yourapp'.
The system cannot find the file specified
Show/Hide Stacktrace
at Ranorex.Host.RunApplication(String fileName, String arguments, String workingDirectory, Boolean maximized) at RanorexTeest.Recording2.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\Administrator\Documents\Ranorex\RanorexStudio Projects\RanorexTeest\RanorexTest\Recording2.cs:line 83 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext)

Any workaround or solution is greatly appreciated :!: :)

Re: Retrieval of test case failure (not after suite finishes)

Posted: Tue Jun 21, 2016 2:21 pm
by Support Team
Hi mxdotnet,

Unfortunately it is not possible out of the box to access these messages during the test execution, but I'd suggest attaching the report itself to the email. For this purpose, you could use our Ranorex to PDF converter.

Hope that would be a suitable workaround for you.

Regards,
Markus (S)