repository and 2 enviroments

Ask general questions here.
Dyshar
Posts: 21
Joined: Thu Feb 23, 2012 3:06 pm

repository and 2 enviroments

Post by Dyshar » Thu Mar 29, 2012 1:09 pm

Hello,
i have a problem..
i have 2 enviroments for testing and sometiems i am recording on first one and sometimes on secondone and in repository i have 2 folders, respectively 3 becouse first folder is made variable.
and my question is simple. Can i somehow join all 3folders together ?

example:
1enviroment is http://sys.test.cz
2enviroment is http://int.test.cz

in repository i have folders
1folder /dom[@domain='$enviroment']
2folder /dom[@domain='int.test.cz']
3folder /dom[@domain='sys.test.cz']
and udner each of them i have a piece of recorded progrem
1 folder
- button 1
- button 2
- button 3
2 folder
- button 1
- button 4
3 folder
- button 1
- button 5

and i need only one folder with all things together.
1folder /dom[@domain='$enviroment']
- button 1
- button 2
- button 3
- button 4
- button 5

Dyshar
Posts: 21
Joined: Thu Feb 23, 2012 3:06 pm

Re: repository and 2 enviroments

Post by Dyshar » Thu Mar 29, 2012 1:11 pm

and i need for future to let program still save all things to folder1 with variable path ? is it possible ?

Dyshar
Posts: 21
Joined: Thu Feb 23, 2012 3:06 pm

Re: repository and 2 enviroments

Post by Dyshar » Mon Apr 02, 2012 10:52 am

any idea ?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: repository and 2 enviroments

Post by Support Team » Mon Apr 02, 2012 11:01 am

Hi,

sorry for the lat response.
Basically there is no way to merge to repositories via Ranorex Studio.
But you can copy/paste from one repository to another.
And, as described in following chapter of our user guide, you can use one and the same repository for different recordings:
http://www.ranorex.com/support/user-gui ... ation.html


Regards,
Tobias
Ranorex Team
.
Image

Dyshar
Posts: 21
Joined: Thu Feb 23, 2012 3:06 pm

Re: repository and 2 enviroments

Post by Dyshar » Mon Apr 02, 2012 1:01 pm

and is here any possibility to let him save everything to 1 repository to main folder with variable parametr ?
1folder /dom[@domain='$enviroment']

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: repository and 2 enviroments

Post by Support Team » Mon Apr 02, 2012 1:07 pm

Hi,

by using one and the same repository for each and every recording, the repository items of each recording will be saved in the same repository.
The variable can be bound to different values for each and every test case holding a recording using the repository.


Regards,
Tobias
Ranorex Team
.
Image

Dyshar
Posts: 21
Joined: Thu Feb 23, 2012 3:06 pm

Re: repository and 2 enviroments

Post by Dyshar » Mon Apr 02, 2012 3:30 pm

chmm i know but i have a problem that i made variable from main directory of repository but if i do this and continue with recording, ranorex make new (Second) main directory becouse he dont know what is it in variable, it knows only test case. And my question is, is there any way how to let him know it ? So when i will continue with recordin he will still use my main directory with variable ? Or there is not a way and i need copy paste everything new record items to main directory with variable ?

my all enviroments are absolutly same (or at lease should be :) ) only a path is not same.

and i have second question - i am doing a lots of validation on items what dont exist and ranorex all time wait very long time - like 1,5min till he finish with validation and then continue.
I found that on each directory i can set timer and to each subdirectory etc.. and on element too. And ranorex make suma of all this time and its time what ranorex will wait.. and my question is simply, is here a way how to tell ranorex. wait max 10s then continue withous changing time on all directories ?
(Example
main directory of repository (wait 30sec)
subdirectory of main directory (wait 20sec)
element which i am validating for not exist (15sec)
withous changing system will wait 65sec till continue
if i change time on element to 1sec, system will wait 51sec
if i will change time on subdirectory to 1sec aswell, system will wait 32sec, but this change will afect all items in this directory - and i really dont want it)
end of example)

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: repository and 2 enviroments

Post by Support Team » Tue Apr 03, 2012 1:36 pm

Hi,
Dyshar wrote:Or there is not a way and i need copy paste everything new record items to main directory with variable ?
Yes, you have to copy/paste the items after recording. It's not possible to automatically add the items to the variable folder, as the the variable has no value and therefore the RanoreXPath does not identify any object.
Support Team wrote:is here a way how to tell ranorex. wait max 10s then continue without changing time on all directories ?
Basically you have to change the search timeout for each and every level of your repository structure.
If you do not want to affect all items in a specific directory you can set the directories search timeout in code and after validating reset it again. Therefore just convert the action to user cod (right-click on the action in recorder and choose "Convert to User Code") and surround the generated code with following code snippet:
Duration old_timeout = repo.<ParentFolder>.SearchTimeout;
repo.<ParentFolder>.SearchTimeout = 100;
// ...
// Validation Steps
// ...
repo.<ParentFolder>.SearchTimeout = old_timeout;
Regards,
Tobias
Ranorex Team
.
Image