Issues with latest/documented Docker run command using Katalon Docker images above 7.2.1 (in AWS)

Has anyone been able to use the Docker run command (intended for Katalon Docker images (KDI) above 7.2.1) successfully in an AWS environment?

In other words the command below (also specified at GitHub - katalon-studio/docker-images: Docker images for Katalon Studio and other frameworks and Docker Image | Katalon Docs)

docker run -t --rm -v "$(pwd)":/tmp/project katalonstudio/katalon katalonc.sh -projectPath=/tmp/project -browserType="Chrome" -testSuiteCollectionPath="Test Suites/TS_RegressionTestCollection" -apiKey="<your_API_key>"

Do note im able to successfully run KDI 8.5.2 using the above command when using Docker on my local machine, but when i use it on AWS (as this is where im having the issue) i get the following error:

...
Cleaning up workspace
Opening project file: /tmp/project
Invalid argument: Cannot find project '/tmp/project'.
All launchers terminated
+ ret_code=4
+ exit 4
...

Katalon isnt able to see the ‘.prj’ file i believe.

The AWS and local KDI are the same, so i think things should work the same, but evidently they dont.

I am able to run KDI 8.5.2 in AWS but using the older style katalon-execute.sh (intended for Docker images below 7.2.1). Its odd that im able to run a new version of KDI but using the old run command.

docker run -t --rm -v \
  "$(pwd)":/katalon/katalon/source \
  katalonstudio/katalon:8.5.2 \
  katalon-execute.sh \
  -apiKey="${KATALON_KEY}" \
  -browserType="Chrome" \
  -retry=0 \
  -statusDelay=15 \
  -retryFailedTestCases=false
  -testSuitePath="Test Suites/${SUITE}" \
  -executionProfile="${PROFILE}" \

Running KDI 8.5.2 in local Docker which uses newer style katalonc.sh (intended for Docker images above 7.2.1). This makes sense as im using the Docker command allowed for this version of KDI.

docker run -it --rm -v \
  "$(pwd)":/tmp/project \
  katalonstudio/katalon:8.5.2 \
  katalonc.sh \
  -apiKey="${KATALON_KEY}" \
  -projectPath=/tmp/project \
  -browserType="Chrome" \
  -retry=0 \
  -statusDelay=15 \
  -retryFailedTestCases=false
  -testSuitePath="Test Suites/test-suite" \
  -executionProfile="test-env"

Ideally i want the same Docker run command that works locally and in AWS.

Any help/advice would be great.

Hey,

According to this document AWS CodeBuild Integration | Katalon Docs, I guess this is its format.

It looks like you are trying to use the katalonc.sh script to execute your test cases, which is the recommended way to run test cases using the Katalon Docker images starting from version 7.2.1. However, you are encountering an issue where the .prj file is not being found when running the script in AWS.

There could be a few reasons for this issue:

  1. Make sure that the path to the .prj file is correct. You are using $(pwd) to specify the path to the current directory, which should work if you are in the correct directory where the .prj file is located. You can try specifying the absolute path to the .prj file to make sure that the path is correct.
  2. Make sure that the .prj file is located in the /tmp/project directory on the Docker container. This is the directory that you are mounting as a volume using the -v "$(pwd)":/tmp/project option in the docker run command. If the .prj file is not located in this directory, it will not be available to the katalonc.sh script.
  3. Make sure that the permissions on the .prj file and the directories in the path to the file are set correctly. The katalonc.sh script needs to have read access to the .prj file in order to open it.
  4. Make sure that you are using the correct version of the Katalon Docker image. The katalonc.sh script is only available in Katalon Docker images starting from version 7.2.1. If you are using an older version of the image, you will need to use the katalon-execute.sh script instead.

I hope these suggestions help resolve the issue you are experiencing. Let me know if you have any further questions or if you need more assistance.

Hi Waqas,
I have tried specifying the absolute path to the .prj file but the error persist. We have been experiencing this blocker for over 3 months now and Katalon support has not been able to help us. I don’t know if you can assist. Thank you.

Issue with docker run command with Katalon docker images 8.5.5.

This command is currently failing within our AWS CodePipeline::

[Container] 2023/04/26 13:52:48 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: docker run -t --rm -v “$(pwd)”:/katalon/katalon/source katalonstudio/katalon:8.5.5 katalon-execute.sh -apiKey=9d79457b-3b2f-4161-8334-dgfdgdgfgdfg -browserType=“Chrome (headless)” -retry=0 -statusDelay=15 -testSuitePath=“Test Suites/Pipeline Control Gate” -executionProfile=“QA”. Reason: exit status 1

Does anyone know what could be the fix for this issue? We have been blocked for over 3 month on this issue and Katalon support has not been able to help us find a fix to resolve this issue. Any help will be highly appreciated

Hi,
I have the same issue.
I did everything from the scratch but it fails exactly with the same error

Opening project file: /tmp/project
Invalid argument: Cannot find project '/tmp/project'.
All launchers terminated

There is no project dir by this path. Looks like docker image does not store at all.

I used the latest docker image
katalonstudio/katalon latest

Hi,

Sorry for my late response. I will ask my team and back to you soon

Any Update on this issue?

Hi @psharma ,

Can you please test for me with the latest Katalon Docker and provide me with the correct error log and screenshot so that I can create a ticket for this issue? Since the original post was created quite a long time ago. I will keep you guys updated on the ticket status. Thank you so much!

Hi,

Thanks for the reply, I am new with Katalon and so if you could point me in the right direction. I am trying to execute test suite with docker image with the help of jenkins pipeline.

Here is the exact command I used : " sh ‘docker run -t --rm -e KATALON_USER_ID=1000 -v “/opt/jenkins_agent/workspace/IS_Katalon/Investigator_Space/”:/tmp/project katalonstudio/katalon katalonc.sh -projectPath=/tmp/project -executionProfile=“Staging” -browserType=“Chrome” -retry=0 -statusDelay=15 -testSuitePath=“Test Suites/Regression Suite Master/Admin Reports” -apiKey=4074082e-3c20-417XXXXXXXX -orgID=1309’"

I have attached the error log file.

Quick response would be very helpful, thanks in advance.

Thanks,
Paras

error_on_execution_19Feb.txt (7.45 KB)