Docker Katalon - Invalid argument: Cannot find project '/tmp/katalon_execute/project'.

Operating System: Windows 10 w/ Windows Subsystem for Linux

Katalon Studio Version: docker-images v6.1.4

Katalon Studio Logs

Summary
+ echo 'Starting Katalon Studio'
Starting Katalon Studio
+ cat /katalon/version
Google Chrome 74.0.3729.131
Mozilla Firefox 66.0.3
Katalon Studio 6.2.0
++ pwd
+ current_dir=/
+ workspace_dir=/tmp/katalon_execute/workspace
+ mkdir -p /tmp/katalon_execute/workspace
+ chmod -R 777 /tmp/katalon_execute/workspace
+ source_dir=/katalon/katalon/source
+ '[' -d /katalon/katalon/source ']'
+ project_dir=/tmp/katalon_execute/project
+ mkdir -p /tmp/katalon_execute/project
+ cp -r /katalon/katalon/source/report /tmp/katalon_execute/project
+ cd /tmp/katalon_execute/project
+ '[' -f /tmp/katalon_execute/project/build.gradle ']'
+ cd /
+ touch /tmp/katalon_execute/project/.classpath
+ chmod -R 777 /tmp/katalon_execute/project
+ rm -rf /tmp/katalon_execute/project/bin
+ rm -rf /tmp/katalon_execute/project/Libs
+ ls -la /tmp/katalon_execute/project
total 12
drwxrwxrwx 3 root root 4096 Jun 11 21:50 .
drwxr-xr-x 4 root root 4096 Jun 11 21:50 ..
-rwxrwxrwx 1 root root    0 Jun 11 21:50 .classpath
drwxrwxrwx 2 root root 4096 Jun 11 21:50 report
+ report_dir=/katalon/katalon/report
+ '[' -d /katalon/katalon/report ']'
+ report_dir=/katalon/katalon/source/report
+ mkdir -p /katalon/katalon/source/report
+ args=("$KATALON_KATALON_INSTALL_DIR/katalon" "$@")
+ args+=("-runMode=console")
+ args+=("-reportFolder=$report_dir")
+ args+=("-projectPath=$project_dir")
+ cd /tmp/katalon_execute/workspace
+ xvfb-run -s '-screen 0 1024x768x24' /opt/katalonstudio/katalon '-testSuitePath=Test Suites/Testbed' -browserType=Firefox -retry=0 -retryFailedTestCases=false -executionProfile=default --stop-timeout 60 --attach stdout --network testbed_idpnet -runMode=console -reportFolder=/katalon/katalon/source/report -projectPath=/tmp/katalon_execute/project
Katalon workspace folder is set to default location: /opt/katalonstudio/config
Starting Groovy-Eclipse compiler resolver.  Specified compiler level: unspecified
170 2.4.7.xx-201611170128-e46 = ACTIVE


INFO: Katalon Version: 6.2.0
INFO: Command-line arguments: -testSuitePath=Test Suites/Testbed -browserType=Firefox -retry=0 -retryFailedTestCases=false -executionProfile=default --stop-timeout 60 --attach stdout --network testbed_idpnet -runMode=console -reportFolder=/katalon/katalon/source/report -projectPath=/tmp/katalon_execute/project
INFO: User working dir: /tmp/katalon_execute/workspace
INFO: User home: /root
INFO: Java vendor: Oracle Corporation
INFO: Java version: 1.8.0_191
INFO: Local OS: Linux 64bit
INFO: CPU load: 81%
INFO: Total memory: 1980 MB
INFO: Free memory: 74 MB


Project path is a folder.
Examine file '.classpath'.
Examine folder 'report'.
Opening project file: /tmp/katalon_execute/project
Invalid argument: Cannot find project '/tmp/katalon_execute/project'.
+ ret_code=4
++ id -u
++ id -g
+ chown -R 0:0 /katalon/katalon/source/report
+ chmod -R 777 /katalon/katalon/source/report
+ ls /katalon/katalon/source/report
+ cd /
+ exit 4

Environment (for Web testing): Docker image

Steps to reproduce Following the instructions for the simple use case in the README.md.

docker run -t --rm -v "$(pwd)":/katalon/katalon/source katalonstudio/katalon katalon-execute.sh -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/TS_RegressionTest"

Expected Behavior: Katalon tests run

Actual Behavior: Katalon throws an error

Additional Details

See https://github.com/katalon-studio/docker-images/issues/42#issuecomment-501019646

If I am reading the error output correctly, katalon-execute.sh is attempting to use the project folder instead of the project file when running Katalon.

I believe that this can be resolved by adding a command along the lines of:

project_prj_file=$(find $project_dir -name "*.prj"

around line 27 and then changing the last part of building the command to:

args+=("-projectPath=$project_prj_file")

I attempted to fork the project and correct it locally on my machine, but ran into a number of issues attempting to build the docker image (likely because I’m using WSL on Windows 10).

1 Like

I extracted the katalon-execute.sh file, added my suggested code changes above, and then re-added it to the container using an overlay with docker config create --template-driver golang katalon-execute ./katalon/katalon-execute.sh (and some other docker magic) and now it all works like a charm.

I’ve also reproduced everything on a VM running Ubuntu 18.04.2 LTS x86_64 so that increases my confidence that this is the root cause of the error.

i saw latest docker image seems has the updated line
you may check.

Yes, thank you. I submitted PR#69 which got merged into master on July 4, 2019.

I see. Thank you for this. I raised question in community as one of my test suite failed and throws file or path not found error.
Could be this is the root cause. Glad to know from you.