Running TestScenarios on Different Envionments ?

Ask general questions here.
huzunkaya
Posts: 8
Joined: Tue Feb 03, 2015 7:57 am

Running TestScenarios on Different Envionments ?

Post by huzunkaya » Wed Feb 11, 2015 9:36 am

Hi everybody,

Im working on bank project with Ranorex first time. I have completed 2 part of project.
But we have a serious problem that I implement my test scenarios on a environment TEST4 with URL.

Now they want me to run my scenarios on TEST8 with different URL.
Content is the same but context is changing and ranorex cant not find the objects.

Is there anyway different from tracking all objects again ?? (there are more than 400 :\)

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

Re: Running TestScenarios on Different Envionments ?

Post by krstcs » Wed Feb 11, 2015 3:28 pm

That depends on how you created the repository objects in the first place.

What is the XPath of the /dom object? You could, for instance, change the /dom to use the domain and make it a variable that is passed in either as a global parameter on the command-line, or as a data table.


/dom[@domain=$Domain]

Then, you could create the actual URL on the fly using the domain variable and the page of the application.

Code: Select all

Domain = "www.mydomain.com";
URL = "http://" + Domain + "/index.html";
Then, just launch the browser with the current URL. As long as the domain variable is bound correctly, it will be used every time a repo object under that /dom is searched for.
Shortcuts usually aren't...

huzunkaya
Posts: 8
Joined: Tue Feb 03, 2015 7:57 am

Re: Running TestScenarios on Different Envionments ?

Post by huzunkaya » Thu Feb 12, 2015 8:08 am

Thank your for your answer.

İ have checked the domains and changed it.
this time it works but only some of them :/

]/container[@id='7.3']
]/container[@id='7.2']

other object xpaths have these kind of differences and there is no pattern between these changings.

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

Re: Running TestScenarios on Different Envionments ?

Post by krstcs » Thu Feb 12, 2015 3:32 pm

I don't understand the question.

Also, if you can't predict the outcome of a test, then either the test isn't valid or the system needs to be tested differently.
Shortcuts usually aren't...