Cannot run in console mode on Ubuntu


#1

Hi, I am trying to run a test suite in console mode, but am receiving an error about project descriptions and this fails the test. For some reason, it thinks the workspace location is my /config when it should just be .

When running console mode in MacOS, everything works fine, but Ubuntu does not:

/opt/katalon/katalon -runMode=console -consoleLog -projectPath="/home/jenkins/automation-project/PDSAutomationTests .prj" -reportFolder=“Reports” -reportFileName=“report” -retry=0 -testSuitePath=“Test Suites/PDS Automation” -browserType=“Chrome”

Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
122 2.4.7.xx-201611170128-e46 = ACTIVE
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:169)
at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:53)
at org.eclipse.core.internal.resources.Project.create(Project.java:263)
at org.eclipse.core.internal.resources.Project.create(Project.java:247)
at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProjectDescription(GroovyUtil.java:484)
at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProject(GroovyUtil.java:149)
at com.kms.katalon.groovy.util.GroovyUtil.openGroovyProject(GroovyUtil.java:585)
at com.kms.katalon.dal.fileservice.manager.ProjectFileServiceManager.openProject(ProjectFileServiceManager.java:62)
at com.kms.katalon.dal.fileservice.dataprovider.ProjectFileServiceDataProvider.getProject(ProjectFileServiceDataProvider.java:22)
at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:91)
at com.kms.katalon.execution.console.ConsoleMain.getProject(ConsoleMain.java:223)
at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:130)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:70)
at com.kms.katalon.console.application.Application.runConsole(Application.java:62)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

Contains: OK
Contains: /home/jenkins/automation-project overlaps the workspace location: /home/jenkins/automation-project/config


#2

Your project file is invalid. Seems like you renamed you project. Check for old eclipse project files and delete them.


#3

terminal is not accepting if folder name is not modified


#4

hello Thinh, were you able to resolve this issue? If so how? Thanks
I am having same issue from Windows. The project itself execute fine in GUI mode manually, but getting error when try to run in console mode from command line/batch file.


#5

Maybe you tried to start the script from inside the directory where the project is stored. In my case this caused the error. Starting the script from another location made it work.


#6

@Rudolf
What do you mean by your comment “starting the script for another location made it work”? Can you give me an example?
I am having the exactly same issue when executing tests via Jenkins after doing git pull first. (using Katalon 5.2.0)

–> And if I execute tests via Katalon Studio or command line (locally) everything works as expected.


#7

@Rudolf thank you! moving the batch file outside of the project works for me.
@Rasko, for example, in my case,say project is under c:\project1, my batch file cannot be inside c:\project1; so I put under c:\temp\


#8

Thanks @“ai test”
It works for me now too…


#9

Which batch file? Are you talking about bat file that runs katalon on Windows? What about Ubuntu?


#10

THANK YOU @Rudolf! This resolved my same problem. My environment is:

  1. Windows OS

  2. From Katalon Studio -> Generate Property File -> Created new console.properties file. But not sure if this helps anything, but I did and it contains details about the console test.

  3. From Katalon Studio -> Generate Command -> Save the command into a text file. We can copy-paste it to a console (DOS, etc.) or create it as an executable batch file.

  4. FAILED: I ran the command from inside the test project main directory. This caused the error above.

  5. SUCCESS: I changed directory anywhere outside the test project. The command test executed successfully!