## Background
Per the documentation on Console Mode Execution, we should be able to override a property specified in the console.properties (-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(OptionSet.java:179)
at joptsimple.OptionSet.valueOf(OptionSet.java:153)
at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:146)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:90)
at com.kms.katalon.console.application.Application.runConsole(Application.java:76)
at com.kms.katalon.core.application.Application.runConsole(Application.java:72)
at com.kms.katalon.core.application.Application.start(Application.java:56)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
## 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. test.properties
- Start an Android emulator (running on port 5554)
- Add to the properties file the following properties:
noSplash=true
runMode=console
projectPath=MobileTestingSample.prj
consoleLog=true
browserType=Android
deviceId=emulator-5554
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\ Studio.app/Contents/MacOS/katalon -propertiesFile='/Users/chris/Katalon Studio/MobileTestingSample/test.properties' -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