Let me assume, I have a single Web Application in multiple environments: the development, the staging, the production-blue, the production-green and more. These environments have 99% same contents and features except the following differences:
Username/Password — e.g. kazurayam/foobar for development, John Doe/ThisIsNotAPassword for production.
Now I want to:
I want to use Katalon Studio to test Web UI of all these environments using a single set of Test Suites/Test Cases.
I want to store the Katalon project into the GitHub and to expose it public (just as I did here).
Still I want to hide my sensitive information: hostname, username and password. I do not like making them visible anywhere in the repository.
I want to run the test against multiple targets (hostnames) in Continuous Integration process on Jenkins. In order to do this, I need to be able to switch the test target by command line argument without modifying the source code of the test at all.
As I wrote in https://github.com/kazurayam/KatalonPropertiesDemo, I have a feature request to Katalon Studio Console Mode Execution so that it accepts argument which give value to JVM System Property.
Should I raise another post in ‘Feature/Improvement Suggestion’?
what would be the advantage of using the configurable properties instead of simply using different profiles. The only advantage i see is that you can use the same profile (global variables) with multiple properties. Is there more than that?
Please find the date of my initial post — 3/27/2018. At that time we had v 5.3.x which did not have Execution Profile yet. Still I wanted a method to specify parameters (username, password) runtime. Therefore I invented the method driven by katalon.properties. Later in April 2018, Execution Profile was introduced to Katalon Studio at v5.4.0.
The advantage of katalon.properties file for me, in comparison to Profiles, is that I can exclude the file out of Git repository. By .gitignoring the katalon.properties I can be 100% sure that my sensitive information(password) is NOT exposed to public even when I put the repository public on GitHub.
Thanks @kazurayam for the explaination. This sounds plausible.
I am using profiles and by now I am quite happy. However would love to have a possibility to overwrite global properties in the execution command. e.g. i want to run the test with almost the same profile, only the baseURL in the profile is different. For that i want to specify the baseURL in the execution command. e.g.
It’s looks like I missed something, did I need to use jar file which is you provided and create katalon properties?
if I uses katalon properties it means I still need to open file and edit the properties before execute the command right? is there any way to make it put the variable like usually uses for executing katalon via command line, by typing -updateTestRail=true -testRailRunId=5191
is there any way to make it put the variable like usually uses for executing katalon via command line, by typing -updateTestRail=true -testRailRunId=5191
No, there isn’t. It is the very reason why you are now working on using OS-level environment variable, isn’t it? Using environment variables, you are going to overwrite the values of GlobalVariables.