Skip execution of a recording to the end

Ask general questions here.
User avatar
maulemon
Posts: 6
Joined: Fri Oct 23, 2015 11:56 am

Skip execution of a recording to the end

Post by maulemon » Tue Jul 05, 2016 4:17 pm

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
Recording
Recording.png (11.5 KiB) Viewed 534 times
Thanks,
Mau.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Skip execution of a recording to the end

Post by krstcs » Tue Jul 05, 2016 4:29 pm

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.
Shortcuts usually aren't...

User avatar
maulemon
Posts: 6
Joined: Fri Oct 23, 2015 11:56 am

Re: Skip execution of a recording to the end

Post by maulemon » Wed Jul 06, 2016 4:44 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Skip execution of a recording to the end

Post by krstcs » Wed Jul 06, 2016 5:38 pm

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.
Shortcuts usually aren't...

User avatar
maulemon
Posts: 6
Joined: Fri Oct 23, 2015 11:56 am

Re: Skip execution of a recording to the end

Post by maulemon » Thu Jul 07, 2016 2:18 pm

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.