Shortening Validation Duration

Ranorex Spy, Recorder, and Studio.
mcs
Posts: 29
Joined: Mon Aug 11, 2014 5:00 pm
Location: Portsmouth, NH

Shortening Validation Duration

Post by mcs » Mon Aug 11, 2014 5:19 pm

I am fairly new to Ranorex so, although there may be no stupid questions... this still may be one of them. :wink:
I am using my own user code with Ranorex and have quite a few Validate.Exists and Validate.NotExists items which check for the correct display of error messages at appropriate times.
My issue is this: The validations are taking a long time. From my reading in the API documentation, it seems that the only way to shorten the time is to use the RxPath to be able to use Duration as an argument.
I was hoping that there was a away to use the Repository iteminfo instead since the RxPath tends to be long, unwieldy and not very clear to others reading my code. Is this possible or is there another, more readable, way to do this? (Note: I did try using the RxPath with Duration and it did, considerably, speed up the running of my tests).
Thank you.

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

Re: Shortening Validation Duration

Post by krstcs » Tue Aug 12, 2014 1:36 pm

First, if you are new to Ranorex I would HIGHLY encourage you to use the Ranorex Action Table mechanics along with the Object Repository. These things are designed to help make testing easier.

Second, without seeing your code and paths it is very difficult to know where you might be missing something. I would guess that you have some issues with object identification. Note that timeouts do not make your test RUN faster, they only make it FAIL faster when Ranorex doesn't find the object within the timeout period.

Third, Ranorex is built around using XPath for object recognition, so you should get very familiar with it and you should be using it extensively for object identification (preferably by using the Repository as mentioned above). Better XPath = Faster Tests.
Shortcuts usually aren't...

mcs
Posts: 29
Joined: Mon Aug 11, 2014 5:00 pm
Location: Portsmouth, NH

Re: Shortening Validation Duration

Post by mcs » Tue Aug 12, 2014 3:00 pm

Thank you for the information. I have been doing my best to learn the Ranorex ways and I do use the Object Repository extensively.
Just one further question on this, though: in the Repository, there are two columns, Item and Path. Is the Item not, in effect, a variable name of the associated RxPath or is using the item name vs. the RxPath two totally different methods of object identification?

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

Re: Shortening Validation Duration

Post by krstcs » Tue Aug 12, 2014 3:39 pm

You are correct. The item name is used by Ranorex as a pointer to the XPath associated with that name.

This allows you to manipulate the XPath in the repository without changing the tests.

Normally any changes to the Item Name are propagated throughout the test scripts as well, so you could change the name to be more meaning full without changing the XPath, or vice versa.


So, think of it like this:
1. The Repo Item is an object that HAS an XPath associated with it.
2. Ranorex tests take actions on the Repo Item.
3. The Repo Item's path is used at runtime to determine which UI element to act upon.
Shortcuts usually aren't...