Command line argument `-Dkatalon.user.home=xxxx`

PLS have a look at this first:

https://github.com/kazurayam/KatalonPropertiesDemo

----

I hope I can specify JVM System Property katalon.user.home as command line arguments for the Katalon Studio in Console Mode.

For example, I would type like this if I want to test the production Blue environment:

>cd %KatalonStudioInstalledDir%>.\katalon.exe -Dkatalon.user.home=C:\Users\myname\tmp\blue -runMode=console -noExit -projectPath="C:\Users\myname\katalon-workspace\KatalonPropertiesDemo\KatalonPropertiesDemo.prj" -testSuitePath="Test Suites/TS_Run" -browserType="Firefox"

Here I typed an argument -Dkatalon.user.home=xxxxxx. I mean this argument adds a JVM System Property named katalon.user.home. This property will be available to any running Groovy code within the project. I learned the argument -Dnnnnn=xxxxx from the good-old java command.

Here I mean the katalon.user.home system property stands for the location of katalon.properties file to be loaded. In this case C:\Users\myname\tmp\blue\katalon.properties file should be loaded by the Test Listener.

Next I want to test the production Green environment by typing like this:

>.\katalon.exe -Dkatalon.user.home=C:\Users\myname\tmp\green -runMode=console -noExit ...

In this case C:\Users\myname\tmp\green\katalon.properties file should be loaded by the Test Listener.

Finally I want to test the staging environment by typing like this:

>.\katalon.exe -Dkatalon.user.home=C:\Users\myname\tmp\staging -runMode=console -noExit ...

In this case C:\Users\myname\tmp\staging\katalon.properties file should be loaded by the Test Listener.

I would like to emphasize that -Dkatalon.user.home=XXXXXXXXX argument would enhance the usability of Katalon Studio significantly. Provided with this feature I can switch the AUT just by typing different location of katalon.properties file as a command line argument, while no modification in the project’s code set required at all. This feature will make it easy to run Katalon Studio in Continuous Integration processes in Jenkins targeting multiple hosts. This will make Katalon Studio a good tool applicable to Blue-Green deployment.

I am aware that Katalon Studio v5.3.1 Console Mode Execution does NOT accept the **-Dnnnn=xxxx** arguments. I home Katalon Team to consider adding this feature.

2 Likes

I made a mistake. This post is categorized in `Katalon Recorder`. But I meant it to be `Katalon Studio`. I don’t know how to amend.

1 Like

Thank you @4280-kazurayam. I’ve moved this discussion to Katalon Studio subforum.

Hi kazurayam,

So overall the purpose you want to utilize your test scripts to be executed in different environments, and your suggestion is the approach you can think of, is it correct?

Regards

You are right. Thank you.

1 Like

With our new execution profile is in place now from 5.4, is there something else you also need based on your current context?

Vinh,

With our new execution profile is in place now from 5.4

Yes, I am aware of it.

is there something else you also need based on your current context?

Well, I have a question about ‘Sensitive Text Encryption’ announced at. https://docs.katalon.com/display/KD/Version+5.4

When I click Sensitive Text Encryption, Confluence Login Page comes up:

I do not understand this.

Do you have any documentation on the “Sensitive Text Encryption” feature somewhere else?

スクリーンショット 2018-05-04 12.12.15.png

1 Like

Hi ,

Our mistake. We’ve unlocked this page, so you and other users can view it again :). Thanks for your information

You can close this post if you would like.

1 Like