Page 1 of 1

Skip execution of a recording to the end

Posted: Tue Jul 05, 2016 4:17 pm
by maulemon
Hi,

How in code could I decide to finish execution of a Test Module prematurely?

For example as an input to a test case we provide a file list.
If a file list is empty there is no need to execute current recording.

Is there a way to continue the execution to the next data iteration / test case?
Recording.png
Thanks,
Mau.

Re: Skip execution of a recording to the end

Posted: Tue Jul 05, 2016 4:29 pm
by krstcs
You will need to change ALL actions in the recording to user-code and wrap all of the actions that need to be skipped in an 'if' statement. I do this all the time.

This will also require that you change any of your current code modules to either be in the same module as the if, or you will need to call them manually inside the if, instead of using the Ranorex Action table.

Re: Skip execution of a recording to the end

Posted: Wed Jul 06, 2016 4:44 pm
by maulemon
Hi,

I see - this could be a workaround but usability of such approach is not really great.

Would it be possible to introduce a new method in the next version of Ranorex which could implement required behaviour?

Thanks,
Mau.

Re: Skip execution of a recording to the end

Posted: Wed Jul 06, 2016 5:38 pm
by krstcs
If you want to make a feature request, you need to email [email protected]. They do not accept feature requests via the forums (I do not work for Ranorex, I'm a user, like you).


Ranorex is purposely built on the .NET framework in order to allow us to do these types of special case things ourselves. They cannot possibly conceive of all of our test needs, so they try not to make special case actions and methods, that is our job as the test developer.

In my opinion, while Ranorex is pretty easy to get started with, especially if you are doing simple testing, you can't really use it's full potential without learning how to code. Even if you are just using the most basic of Ranorex's features, you are still developing software, using Ranorex's libraries and IDE, so you are a software developer, by definition, and learning how the code works will only help you in the long run.

Re: Skip execution of a recording to the end

Posted: Thu Jul 07, 2016 2:18 pm
by maulemon
Fair enough - I've raised a request via support email as it might be a useful feature to add.

In mean time I'm happy with conversion of GUI steps into code and wrapping it around with an if statement.

Thanks,
Mau.