Define global variables and put them in PATH

Best practices, code snippets for common functionality, examples, and guidelines.
mw-tw
Posts: 17
Joined: Tue Jan 03, 2017 11:29 am

Define global variables and put them in PATH

Post by mw-tw » Thu Mar 09, 2017 10:49 am

Hi,

1. ist there a way to define global variables for each TestCase?

2. can i use this variable in my Repository / Path?


I'm asking because i have two servers on which is the same software installed. I wanna test both servers ant don't want to create two repositories for the solution. I want to use only one where the first part of the path for each repo-object is variable...

mw-tw
Posts: 17
Joined: Tue Jan 03, 2017 11:29 am

Re: Define global variables and put them in PATH

Post by mw-tw » Thu Mar 09, 2017 10:59 am

I think i found how to set variables to use in repository.

But how can i define gloabl variables for all UseCases in one Folder (in my Project)? So that i don't have to set them in each UseCase?

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Define global variables and put them in PATH

Post by qwertzu » Thu Mar 09, 2017 1:01 pm

Hi,

Under the following link you can find how to share data from one module to anohter:
http://www.ranorex.com/blog/sharing-dat ... her/#Step1

You can use the same principle for transferring value between test cases, using Global Parameter to which you can save a value from Test Case A and then read that Global Parameter in Test Case B.

I hope, this helps.