PLS have a look at this first:
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
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.