Not able to execute Katalon from command line

Running this command

katalon -noSplash -runMode=console -consoleLog -noExit -projectPath=“D:\Automation\master_devlopment\NykaaUnifiedAutomation\nykaaUnifiedAutomation101.prj” -retry=0 -testSuitePath=“Test Suites/WebSuite/NykaaDesktop/Production/CheckoutSuite” -executionProfile=“default” -browserType=“Chrome”

Getting Error

Project ‘nykaaUnifiedAutomation101’ opened
joptsimple.IllegalOptionSpecificationException: is not a legal option character
at joptsimple.ParserRules.ensureLegalOptionCharacter(ParserRules.java:77)
at joptsimple.ParserRules.ensureLegalOption(ParserRules.java:67)
at joptsimple.ParserRules.ensureLegalOptions(ParserRules.java:72)
at joptsimple.OptionParser.acceptsAll(OptionParser.java:267)
at joptsimple.OptionParser.acceptsAll(OptionParser.java:260)
at joptsimple.OptionParser.accepts(OptionParser.java:252)
at com.kms.katalon.execution.console.ConsoleMain.acceptConsoleOptionList(ConsoleMain.java:207)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:96)
at com.kms.katalon.console.application.Application.runConsole(Application.java:76)
at com.kms.katalon.core.application.Application.runConsole(Application.java:76)
at com.kms.katalon.core.application.Application.start(Application.java:59)
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)

@anuraggambhir88, please take a screenshot of the terminal from which you run the command and encounter the error.

1 Like

I have resolved the issue. This is coming when there is space in one of my global variable in the end.

Like var = "abc " instead of var=“abc”

1 Like

This joptsimple.IllegalOptionSpecificationException can be caused by a “$” character too, as documented (rather poorly) here:

https://docs.katalon.com/katalon-studio/docs/troubleshoot-globalvariable-special-character.html

The issue is, there is a “$” character in either:

  1. The variable’s name
  2. The variable’s value

So this GlobalVariable would give you a double headache:

image

Thanks to @ThanhTo and @devalex88 for their combined efforts to help find the source of this error.

1 Like