Purposefully Unbinding Variables

Ask general questions here.
tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Purposefully Unbinding Variables

Post by tallahassee101 » Mon May 07, 2012 6:53 pm

Hi,

We have a repository item with an RxPath as such:
element/container/picture[@accessiblename=$tracknumber and @accessiblevalue='Track']

We use this repo item in multiple tests as this item represents an "object" on our GUI display that can be created, modified in numerous different ways, and deleted. Using this repo item and user variables I am able to have a setup test that creates the item, then validation tests and cleanup tests that use the same item.

The setup test finds and sets the variable "tracknumber" and then we want the variable to stay the same for any following test that validates or cleans up the object. The problem is that if a test uses the object the variable "tracknumber" gets added to the variable list expecting to be bound. However if we bind the variable then it would lose the value that it was given in the previous setup test.
Ex. TestSuite:
SetupObject - Variable = "2001"
ValidateObject - Unbound Variable warning
ModifyObject - Unbound Variable warning
ValidateObject - Unbound Variable warning
CleanupObject - Unbound Variable warning

I would like to be able to either remove this unbound variable warning from these tests OR have the variable not appear in the list and still use the object. Is this possible at all without touching user code? User code is not an option as there are over 100 different tests that use this methodology.

Thank you

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Purposefully Unbinding Variables

Post by Support Team » Tue May 08, 2012 1:46 pm

Hi,
I would like to be able to either remove this unbound variable warning from these tests OR have the variable not appear in the list and still use the object.
You can set the "Report Level" of the specific test cases to "Error", then the warnings will not be shown anymore. How are you setting the specific variable, via a Test Case, are the "Objects/Recordings" in different test cases?
If not why have you copied the same variable to each Recording?

Regards,
Markus
Ranorex Support Team

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Purposefully Unbinding Variables

Post by tallahassee101 » Tue May 08, 2012 3:04 pm

Markus,

We have other warnings that we do need to see. The problem is that these "unbound variables" warnings are getting in the way of knowing when a test actually has warnings/errors, since we do not consider the unbound variable an application level warning. Unbound variable is a problem with the test being written, not our application. I understand why its comes up, we just need a way to hide it.

Thanks,
-Nick

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Purposefully Unbinding Variables

Post by Support Team » Thu May 10, 2012 10:56 am

Hi,

At the moment this is unfortunately not possible, but I will also add this to our internal feature request list, maybe we can change it in a way that such warnings won't be shown in the report, but i cannot guarantee that we will change it.

Regards,
Markus
Ranorex Support Team