I'm looking for a way to trigger a function call or just any bits of code (in my C# code module) once a user aborts a test execution (started by the assembly file, not within Studio) by either pressing the shortcut or closing the CMD.
The abort itself is recognized by Ranorex as it writes "The test run has been aborted by the user." into the report, so I'm wondering if there is a way to "listen" to that trigger and execute code based on it. I know about the TearDown option, but I want to execute code bits specifically on user abort, not after every execution generally. I've also seen theres a ThreadAbortException, but I'd rather not have a try catch block wrapping around my entire code module.
Ways to execute code specifically when user aborts test execution
Re: Ways to execute code specifically when user aborts test execution
Hi Ribbl, welcome to the Ranorex Forums!
Unfortunately there is not a way to inject code into the Abort method as this is reserved for the system and, as such, there is no way to trigger additional code from within Ranorex. I would like to defer to the community to see if there are any additional thoughts on this matter, as there is quite the innovative bunch here.
--Jacob
Unfortunately there is not a way to inject code into the Abort method as this is reserved for the system and, as such, there is no way to trigger additional code from within Ranorex. I would like to defer to the community to see if there are any additional thoughts on this matter, as there is quite the innovative bunch here.
--Jacob