Can't override propertiesFile properties with command line parameters

## Background

Per the documentation on Console Mode Execution, we should be able to override a property specified in the (-propertiesFile) on the command line when executing Katalon tests. For example, if “projectPath” is defined in the properties file, we should be able to use a “-projectPath” parameter on the command line to override it.

Currently, when trying to override projectPath, there is an exception about finding “multiple arguments for option”.

**## OS: **OSX High Sierra 10.13.6

## Katalon Studio Version: 5.6.0 build 1

## Katalon Studio logs:

joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option projectPath, but you asked for only one
at joptsimple.OptionSet.valueOf(
at joptsimple.OptionSet.valueOf(
at com.kms.katalon.execution.console.ConsoleMain.findProject(
at com.kms.katalon.execution.console.ConsoleMain.launch(
at com.kms.katalon.console.application.Application.runConsole(
at com.kms.katalon.core.application.Application.runConsole(
at com.kms.katalon.core.application.Application.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(

## Steps to reproduce -

  • Create a new Project named “MobileTestingSample”
  • Create a new Test Case named “My Test Case”
  • Create a new Test Suite named “My Test Suite”
  • Add the Test Case to the Test Suite
  • Create a new properties file in your project’s folder, e.g.
  • Start an Android emulator (running on port 5554)
  • Add to the properties file the following properties:
testSuitePath=Test Suites/My Test Suite

  • From the command line, execute your Katalon Studio Test Suite, specifying the properties file and overriding the projectPath property:
/Applications/Katalon\ -propertiesFile='/Users/chris/Katalon Studio/MobileTestingSample/' -runMode=console -projectPath='/Users/chris/Katalon Studio/MobileTestingSample/MobileTestingSample.prj'

## Expected Behavior -

The MobileTestingSample.prj Test Suite named “My Test Suite” should start from the command line and run to completion.

## Actual Behavior -

An exception is thrown on the command line:

joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option projectPath, but you asked for only one

Chris Trevarthen,
Thanks for your information. I’ve logged this one into our backlog and will be fixed in the next release.

Feel free to post any questions or feedback to make Katalon Studio better. :smiley: