Passing URL's based on environment

I would need to pass URL’s based on environment to test. How can I achieve in Katalon?

Thanks in Advance.


Add a GlobalVariable to your default Profile (or create a custom profile and add it there).

1 Like

In our Test Automation setup we have 6 environments to test on. So we have 6 different custom profiles created that have URL’s added. For e.g BASE_URL is a global variable in every profile. The global variable name is same in all the profiles but have different values. So you can achieve the same using something similar. When you will call this BASE_URL it will go to the URL value defined for this global variable in the test profile you have selected.

1 Like

Thanks Manpreet

I have two profiles created and have same variable name with different URL’s. I am running through test suite has two test cases and called same global variable. It is taking one URL for both test cases. I tried to change profile from menu, it is taking the same URL for both test cases.

Thanks Russ_thomas

The URL value will depend on the Profile you have selected. It should be same for both the test cases in your test suite. Are you sure that you didn’t made any typo ?

Thanks manpreet… It is working now…

Glad to hear that :slight_smile: