Howdy,
This doesn't need to change during execution. I just want to be able to run the tests on any domain I need to.
Testing over multiple domains means that I need the 'ApplicationUnderTest' in the repo to be dynamic.
So instead of ApplicationUnderTest /dom[@domain='blah.test.com.au']
I would like ApplicationUnderTest /dom[@domain=$QAUnderTest+'.test.com.au']
I would like to be able to link $QAUnderTest to a datasource I have.
I assume I am going about this the wrong way, but I am sure someone will set me straight!
How do I create a repo variable linked to a datasource?
Re: How do I create a repo variable linked to a datasource?
You can configure that Repository variable via a code module that reads your datasource, if that is appropriate to your scenario. Or if it's a data-driven test that you run across multiple domains, then you can connect a field in the datasource to that Repository variable in the Ranorex UI via the Data Binding tab on a Test Case or Smart Folder.
Re: How do I create a repo variable linked to a datasource?
Hi,
You just need to use a 'regex' operator, instead of simple 'equal' operator:
/dom[@domain~$QAUnderTest+'.test.com.au']
You just need to use a 'regex' operator, instead of simple 'equal' operator:
/dom[@domain~$QAUnderTest+'.test.com.au']
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How do I create a repo variable linked to a datasource?
The RxPath you posted is correct for your purpose.
In this case the '$QAUnderTest' is a repository variable, you can bind the variable easily to a datasource that can append on any smartfolder in your testsuite.
Open your testsuite and add your TestModule inside of a SmartFolder, after doing so you should see something like this: Unbound variables: 1 in the datasource column.
Just doubleclick on it and the datasource window should appear where you can bind your variable on any parameter or datasource column.
If you are not in mind to change the domain during execution then i would suggest to use a global parameter instead thats called 'CurrentDomain' and bind it to the 'QAUnderTest' variable. You can change the value of the 'CurrentDomain' parameter anytime.
Otherwise you can use a .csv file to define multiple domains where each row represents the current domain that will be saved in your 'QAUnderTest' Repo Variable.
In this case the '$QAUnderTest' is a repository variable, you can bind the variable easily to a datasource that can append on any smartfolder in your testsuite.
Open your testsuite and add your TestModule inside of a SmartFolder, after doing so you should see something like this: Unbound variables: 1 in the datasource column.
Just doubleclick on it and the datasource window should appear where you can bind your variable on any parameter or datasource column.
If you are not in mind to change the domain during execution then i would suggest to use a global parameter instead thats called 'CurrentDomain' and bind it to the 'QAUnderTest' variable. You can change the value of the 'CurrentDomain' parameter anytime.
Otherwise you can use a .csv file to define multiple domains where each row represents the current domain that will be saved in your 'QAUnderTest' Repo Variable.