RE impossible to execute collections suites tests

Hello!

I could really use a little help, because we’re stuck here.

I’m running my Katalon tests via RE on our Gitlab CI.

I created a small script to retrieve the list of all our collections (I only have one for testing at the moment) and then run all the test suites in these collections.

I’m using version 10.2.0 because I’m on ARM64, and the latest versions don’t have an image available for this architecture.

My gitlab-ci :

katalon_job:
  extends:
    - .base_job
  stage: katalon
  rules:
    - if: '$CI_COMMIT_TITLE =~ /(?i)\[force[- ]?katalon?\]/'
      when: always
    - when: never
  image: katalonstudio/katalon:10.2.0 # The latest tag may NOT always support linux/arm64. Always check if linux/arm64 is available on the specified tag https://hub.docker.com/r/katalonstudio/katalon/tags
  services:
    - docker:dind
    - name: selenium/standalone-chromium:latest
      alias: selenium
  script:
      # ───────── Clonage du projet Katalon ─────────
      - KATALON_PROJECT_GIT_URI=${CI_SERVER_HOST}/${KATALON_PROJECT_DIR_BASE}.git
      - rm -rf "$KATALON_PROJECT_DIR"
      - git clone "https://gitlab-ci-token:${CI_JOB_TOKEN}@${KATALON_PROJECT_GIT_URI}" "$KATALON_PROJECT_DIR"

      # ───────── Prépare le dossier de logs ─────────
      - mkdir -p tmp/Katalon/

      # ───────── Exécute chaque collection trouvée ─────────
      - |
        set +e                     # on gère nous‑mêmes les codes retours
        echo "🔎 Recherche des Test Suite Collections…"
        mapfile -d '' TSC_FILES < <(git -C "$KATALON_PROJECT_DIR" ls-files -z "Test Suites/Collections/*.tsc")

        if [ ${#TSC_FILES[@]} -eq 0 ]; then
          echo "❌  Aucune collection *.tsc trouvée sous Test Suites/Collections/"
          exit 1
        fi

        GLOBAL_EXIT=0
        for FILE in "${TSC_FILES[@]}"; do
          # Chemin relatif sans extension pour -testSuiteCollectionPath
          REL_PATH="${FILE#"$KATALON_PROJECT_DIR/"}"   # ex. Test Suites/Collections/test_immo.tsc
          TSC_PATH="${REL_PATH%.tsc}"                  # ex. Test Suites/Collections/test_immo

          echo "🚀  Exécution de la collection : $TSC_PATH"

          katalonc.sh \
            -projectPath="$KATALON_PROJECT_DIR" \
            -apiKey="$KATALON_API_KEY" \
            -retry=0 \
            -statusDelay=20 \
            -browserType="Remote" \
            -remoteWebDriverUrl="http://selenium:4444/wd/hub" \
            -remoteWebDriverType="Selenium" \
            -testSuiteCollectionPath="$TSC_PATH"
          CODE=$?

          # Sauvegarde le log de session dans un fichier dédié
          session_log="$(ls -td /tmp/session-* | head -n 1)/.metadata/.log"
          cp "$session_log" "tmp/Katalon/$(basename "${TSC_PATH//\//_}").log" || true

          if [ $CODE -ne 0 ]; then
            echo "❌  La collection $TSC_PATH a échoué (exit=$CODE)"
            GLOBAL_EXIT=$CODE
          fi
        done

        exit $GLOBAL_EXIT

  artifacts:
     when: always
     paths:
       - tmp/Katalon/
     expire_in: 1 week

And see my result :

Preparing environment 00:00
Using effective pull policy of [always] for container sha256:a2d3d9fef4e043edeb0f660803bb536f1c2d7a4d15b7a94fa687d03cadbd9463
Running on runner-t164qna-project-133-concurrent-0 via runner-t164qna-gitlab-docker-machine-1752744420-056ad826...
Getting source from Git repository 00:03
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/projet-et-applications-it/oxygene/Hub-Applicatif/.git/
Created fresh repository.
Checking out b94a49e2 as detached HEAD (ref is oxy-889-ci-katalon-integration)...
Removing app/assets/builds/
Removing config/database.yml
Removing coverage/
Removing log/test.log
Removing node_modules/
Removing public/assets/
Removing public/uploads/goxygene/
Removing public/uploads/tmp/
Removing test/fixtures/files/uploads/goxygene/document/100000085/
Removing test/fixtures/files/uploads/goxygene/document/Bills/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000015/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000016/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000017/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000042/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000043/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000044/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000045/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000056/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000057/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000058/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000059/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000062/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000077/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000079/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000080/
Removing test/fixtures/files/uploads/goxygene/document/Bills_annexes/100000082/
Removing test/fixtures/files/uploads/goxygene/document/Collections/
Removing test/fixtures/files/uploads/goxygene/document/activity_report/
Removing test/fixtures/files/uploads/goxygene/document/commercial_contracts/
Removing test/fixtures/files/uploads/goxygene/document/exports_da/
Removing test/fixtures/files/uploads/goxygene/document/exports_df/
Removing test/fixtures/files/uploads/goxygene/document/fee_service_files/
Removing test/fixtures/files/uploads/goxygene/document/payslips/
Removing test/fixtures/files/uploads/goxygene/document/personal_files/
Removing test/fixtures/files/uploads/goxygene/document/subcontracting/
Removing test/fixtures/files/uploads/goxygene/documentation_library/
Removing test/fixtures/files/uploads/tmp/
Removing test/reports/
Removing tmp/
Removing vendor/bundle/
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:23
Using effective pull policy of [always] for container katalonstudio/katalon:10.2.0
Using docker image sha256:e845e17bbba1225b7ebd0cbaa50a78c2f28aabaf6e1bfc7ed25be815ae0cdcbb for katalonstudio/katalon:10.2.0 with digest katalonstudio/katalon@sha256:4dbbea87a6415f0c3fac2c1766110714210d38bba96cfac30913bef0b1b7c08d ...
Entrypoint
+ echo Entrypoint
+ '[' -z '' ']'
+ exec sh -c 'if [ -x /usr/local/bin/bash ]; then
	exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
	exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
	exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
	exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
	exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
	exec /bin/sh 
elif [ -x /busybox/sh ]; then
	exec /busybox/sh 
else
	echo shell not found
	exit 1
fi
'
$ KATALON_PROJECT_GIT_URI=${CI_SERVER_HOST}/${KATALON_PROJECT_DIR_BASE}.git
$ rm -rf "$KATALON_PROJECT_DIR"
$ git clone "https://gitlab-ci-token:${CI_JOB_TOKEN}@${KATALON_PROJECT_GIT_URI}" "$KATALON_PROJECT_DIR"
Cloning into '/builds/projet-et-applications-it/Katalon'...
$ mkdir -p tmp/Katalon/
$ set +e                     # on gère nous‑mêmes les codes retours # collapsed multi-line command
🔎 Recherche des Test Suite Collections…
🚀  Exécution de la collection : Test Suites/Collections/test_immo
Starting Katalon Studio
+ echo 'Starting Katalon Studio'
+ cat /katalon/version
Mozilla Firefox 137.0.2
Katalon Studio 
+ args=("$KATALON_KATALON_INSTALL_DIR/katalonc" "$@")
+ xvfb-run -s '-screen 0 1024x768x24' /opt/katalonstudio/katalonc -projectPath=/builds/projet-et-applications-it/Katalon -apiKey=[MASKED] -retry=0 -statusDelay=20 -browserType=Remote -remoteWebDriverUrl=http://selenium:4444/wd/hub -remoteWebDriverType=Selenium '-testSuiteCollectionPath=Test Suites/Collections/test_immo'
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
WARNING: Annotation classes from the 'javax.inject' or 'javax.annotation' package found.
It is recommended to migrate to the corresponding replacements in the jakarta namespace.
The Eclipse E4 Platform will remove support for those javax-annotations in a future release.
To suppress this warning, set the VM property: -Declipse.e4.inject.javax.warning=false
To disable processing of 'javax' annotations entirely, set the VM property: -Declipse.e4.inject.javax.disabled=true
Katalon workspace folder is set to default location: /tmp/session-2a0e66e3
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
213 org.codehaus.groovy_3.0.22.v202406302347-e2406 ACTIVE
Activating...
Start activating offline...
Search for valid offline licenses in folder: /root/.katalon/license
The number of valid offline licenses: 0
INFO: Katalon Version: 10.2.0
INFO: Command-line arguments: -projectPath=/builds/projet-et-applications-it/Katalon -apiKey=******** -retry=0 -statusDelay=20 -browserType=Remote -remoteWebDriverUrl=http://selenium:4444/wd/hub -remoteWebDriverType=Selenium -testSuiteCollectionPath=Test Suites/Collections/test_immo
INFO: User working dir: /builds/projet-et-applications-it/oxygene/Hub-Applicatif
INFO: Error log: /tmp/session-2a0e66e3/.metadata/.log
INFO: Katalon KatOne server URL: https://admin.katalon.com
INFO: Katalon TestOps server URL: https://testops.katalon.io
INFO: Katalon Store server URL: https://store.katalon.com
INFO: User home: /root
INFO: Java vendor: Ubuntu
INFO: Java version: 17.0.14
INFO: Local OS: Linux 64bit
INFO: CPU load: 0%
INFO: Total memory: 3807 MB
INFO: Free memory: 1902 MB
Start getting machine ID on Linux
Start appending additional signatures
End appending additional signatures 8dbe3a8de584494da14467930c3ee8b9__root
End getting machine ID on Linux 866a3baa5fca902dc5fff33ae8f5258c
INFO: Machine ID: 866a3baa5fca902dc5fff33ae8f5258c
Project path is a folder.
Examine folder 'Include'.
Examine folder '.circleci'.
Examine folder 'instructions'.
Examine file 'azure-pipelines.yml'.
Examine file 'codeship-services.yml'.
Examine folder '.buildkite'.
Examine file 'bitbucket-pipelines.yml'.
Examine file '.gitignore'.
Examine folder 'Scripts'.
Examine file 'run_chrome.bat'.
Examine folder 'settings'.
Examine file 'run_chrome.sh'.
Examine folder '.git'.
Examine file 'entityReference.index'.
Examine file 'console.properties'.
Examine folder 'Data'.
Examine file 'run_firefox.sh'.
Examine file '.travis.yml'.
Examine file 'build.gradle'.
Examine file 'Dockerfile'.
Examine file 'katatlon-test.sh'.
Examine folder '.cache'.
Examine file 'README.md'.
Examine file 'docker-compose.yml'.
Examine folder '.harness'.
Examine file 'LICENSE'.
Examine file 'Jenkinsfile'.
Examine folder 'Test Suites'.
Examine folder '.github'.
Examine file 'cloudbuild.yaml'.
Examine folder 'Test Listeners'.
Examine folder 'Object Repository'.
Examine file 'archive.bat'.
Examine folder 'androidapp'.
Examine folder 'Test Cases'.
Examine file 'GlobalVariables.glbl'.
Examine file 'codeship-steps.yml'.
Examine file 'test.prj'.
Found project file '/builds/projet-et-applications-it/Katalon/test.prj'.
Examine file '.gitlab-ci.yml'.
Examine folder 'Profiles'.
Examine folder 'Keywords'.
Examine file 'buildspec.yml'.
Cleaning up workspace
Opening project file: /builds/projet-et-applications-it/Katalon/test.prj
Generating global variables...
Project 'Oxygène_tests' opened
Failed to activate with TestCloud license. Failed to get organization or project info
Activated successfully with Katalon Runtime Engine license. 
Failed to activate with TestCloud license. 
Start reloading plugins...
Katalon version: 10.2.0
Plugin info URL: https://store.katalon.com/api/products/ks?appVersion=10.2.0&appType=ENGINE&licenseType=ENTERPRISE
Test suite 'Test Suites/Collections/test_immo' not found.
Start clean up session
End clean up session
All launchers terminated
+ ret_code=4
+ exit 4
❌  La collection Test Suites/Collections/test_immo a échoué (exit=4)
Uploading artifacts for failed job 00:01
Uploading artifacts...
tmp/Katalon/: found 2 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  id=8656 responseStatus=201 Created token=64_MjPALA
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 4

My script retrieves the collection correctly, but it tells me it’s not found when it tries to launch it… I did exactly as the documentation says: -testSuiteCollectionPath=
Specify the test suite file (without the .tsc extension). The relative path (root being the project folder) must be used in this case.

So I really don’t understand…

If you know the problem? Thank you !

1 Like

Hi there, and thanks for posting in the Katalon community! :hugs:

To help you faster, please review our guide on Git here:

Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon. Thanks for being a part of our community!

Best,
Elly Tran

Based on the detailed log, the issue is clear: Katalon Studio can’t find your test suite collection despite your script locating it correctly.

The Core Problem

Test suite 'Test Suites/Collections/test_immo' not found.

This happens because Katalon expects the path relative to the project root, but your script uses a path that includes the project directory itself.

Fix Your Script

Change this:

bash

REL_PATH="${FILE#"$KATALON_PROJECT_DIR/"}   # ex. Test Suites/Collections/test_immo.tsc
TSC_PATH="${REL_PATH%.tsc}"                 # ex. Test Suites/Collections/test_immo

To this:

bash

# Remove project path prefix and .tsc extension
TSC_PATH="${FILE#"$KATALON_PROJECT_DIR/Test Suites/Collections/"}"
TSC_PATH="${TSC_PATH%.tsc}"

Fully Corrected Script Section

bash

set +e
echo "🔎 Recherche des Test Suite Collections..."
mapfile -d '' TSC_FILES < <(find "$KATALON_PROJECT_DIR/Test Suites/Collections" -name "*.tsc" -print0)

if [ ${#TSC_FILES[@]} -eq 0 ]; then
  echo "❌  Aucune collection *.tsc trouvée sous Test Suites/Collections/"
  exit 1
fi

GLOBAL_EXIT=0
for FILE in "${TSC_FILES[@]}"; do
  # Extract relative path without project directory prefix
  TSC_PATH="${FILE#"$KATALON_PROJECT_DIR/Test Suites/Collections/"}"
  TSC_PATH="${TSC_PATH%.tsc}"
  
  echo "🚀  Exécution de la collection : $TSC_PATH"

  katalonc.sh \
    -projectPath="$KATALON_PROJECT_DIR" \
    -apiKey="$KATALON_API_KEY" \
    -retry=0 \
    -statusDelay=20 \
    -browserType="Remote" \
    -remoteWebDriverUrl="http://selenium:4444/wd/hub" \
    -remoteWebDriverType="Selenium" \
    -testSuiteCollectionPath="Test Suites/Collections/$TSC_PATH"  # Correct relative path

  CODE=$?
  ...
done

Key Changes Explained:

  1. Path Calculation:
  • Original: Test Suites/Collections/test_immo
  • Fixed: test_immo (just the filename without path or extension)
  1. Path in Katalon Command:
  • Added explicit path prefix: -testSuiteCollectionPath="Test Suites/Collections/$TSC_PATH"
  • This matches Katalon’s expected format: "Test Suites/Collections/<filename>"

Why This Works:

Katalon resolves paths relative to the project root. Your original code passed:

Test Suites/Collections/test_immo

But Katalon interpreted it as:

<project-root>/Test Suites/Collections/Test Suites/Collections/test_immo

The corrected version passes the exact path structure Katalon requires.

Additional Recommendations:

  1. Verify File Paths:
    Add this debug step after calculating TSC_PATH:

bash

echo "Katalon will look for: $KATALON_PROJECT_DIR/Test Suites/Collections/$TSC_PATH.tsc"
ls -l "$KATALON_PROJECT_DIR/Test Suites/Collections/$TSC_PATH.tsc"
  1. Use Direct File Paths:
    Simplify by processing only filenames:

bash

find "$KATALON_PROJECT_DIR/Test Suites/Collections" -name "*.tsc" | while read -r FILE; do
  TSC_NAME=$(basename "$FILE" .tsc)
  katalonc.sh ... -testSuiteCollectionPath="Test Suites/Collections/$TSC_NAME"
done
  1. Check Collection Contents:
    Ensure your test_immo.tsc file:
  • Contains valid XML structure
  • References test suites that exist in your project
  • Has no special characters in file paths
1 Like

Hello,
Thank a lot for your help. I have try, but that dont work…

Getting source from Git repository 00:06
Gitaly correlation ID: 01K0EAR2VNJQH60JG07CJWAFAR
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/projet-et-applications-it/oxygene/Hub-Applicatif/.git/
Created fresh repository.
Checking out abf685d8 as detached HEAD (ref is oxy-889-ci-katalon-integration)...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:12
Using effective pull policy of [always] for container katalonstudio/katalon:10.2.0
Using docker image sha256:e845e17bbba1225b7ebd0cbaa50a78c2f28aabaf6e1bfc7ed25be815ae0cdcbb for katalonstudio/katalon:10.2.0 with digest katalonstudio/katalon@sha256:4dbbea87a6415f0c3fac2c1766110714210d38bba96cfac30913bef0b1b7c08d ...
Entrypoint
+ echo Entrypoint
+ '[' -z '' ']'
+ exec sh -c 'if [ -x /usr/local/bin/bash ]; then
	exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
	exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
	exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
	exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
	exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
	exec /bin/sh 
elif [ -x /busybox/sh ]; then
	exec /busybox/sh 
else
	echo shell not found
	exit 1
fi
'
$ KATALON_PROJECT_GIT_URI=${CI_SERVER_HOST}/${KATALON_PROJECT_DIR_BASE}.git
$ rm -rf "$KATALON_PROJECT_DIR"
$ git clone "https://gitlab-ci-token:${CI_JOB_TOKEN}@${KATALON_PROJECT_GIT_URI}" "$KATALON_PROJECT_DIR"
Cloning into '/builds/projet-et-applications-it/Katalon'...
$ mkdir -p tmp/Katalon/
$ set +e # collapsed multi-line command
🔎 Recherche des Test Suite Collections...
Katalon will look for: /builds/projet-et-applications-it/Katalon/Test Suites/Collections/test_immo.tsc
-rw-r--r-- 1 root root 1940 Jul 18 08:37 /builds/projet-et-applications-it/Katalon/Test Suites/Collections/test_immo.tsc
🚀  Exécution de la collection : test_immo
+ echo 'Starting Katalon Studio'
+ cat /katalon/version
Starting Katalon Studio
Mozilla Firefox 137.0.2
Katalon Studio 
+ args=("$KATALON_KATALON_INSTALL_DIR/katalonc" "$@")
+ xvfb-run -s '-screen 0 1024x768x24' /opt/katalonstudio/katalonc -projectPath=/builds/projet-et-applications-it/Katalon -apiKey=[MASKED] -retry=0 -statusDelay=20 -browserType=Remote -remoteWebDriverUrl=http://selenium:4444/wd/hub -remoteWebDriverType=Selenium '-testSuiteCollectionPath=Test Suites/Collections/test_immo'
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
WARNING: Annotation classes from the 'javax.inject' or 'javax.annotation' package found.
It is recommended to migrate to the corresponding replacements in the jakarta namespace.
The Eclipse E4 Platform will remove support for those javax-annotations in a future release.
To suppress this warning, set the VM property: -Declipse.e4.inject.javax.warning=false
To disable processing of 'javax' annotations entirely, set the VM property: -Declipse.e4.inject.javax.disabled=true
Katalon workspace folder is set to default location: /tmp/session-a097285a
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
213 org.codehaus.groovy_3.0.22.v202406302347-e2406 ACTIVE
Activating...
Start activating offline...
Search for valid offline licenses in folder: /root/.katalon/license
The number of valid offline licenses: 0
INFO: Katalon Version: 10.2.0
INFO: Command-line arguments: -projectPath=/builds/projet-et-applications-it/Katalon -apiKey=******** -retry=0 -statusDelay=20 -browserType=Remote -remoteWebDriverUrl=http://selenium:4444/wd/hub -remoteWebDriverType=Selenium -testSuiteCollectionPath=Test Suites/Collections/test_immo
INFO: User working dir: /builds/projet-et-applications-it/oxygene/Hub-Applicatif
INFO: Error log: /tmp/session-a097285a/.metadata/.log
INFO: Katalon KatOne server URL: https://admin.katalon.com
INFO: Katalon TestOps server URL: https://testops.katalon.io
INFO: Katalon Store server URL: https://store.katalon.com
INFO: User home: /root
INFO: Java vendor: Ubuntu
INFO: Java version: 17.0.14
INFO: Local OS: Linux 64bit
INFO: CPU load: 0%
INFO: Total memory: 15672 MB
INFO: Free memory: 8274 MB
Start getting machine ID on Linux
Start appending additional signatures
End appending additional signatures 8dbe3a8de584494da14467930c3ee8b9__root
End getting machine ID on Linux 866a3baa5fca902dc5fff33ae8f5258c
INFO: Machine ID: 866a3baa5fca902dc5fff33ae8f5258c
Project path is a folder.
Examine folder 'Include'.
Examine folder '.circleci'.
Examine folder 'instructions'.
Examine file 'azure-pipelines.yml'.
Examine file 'codeship-services.yml'.
Examine folder '.buildkite'.
Examine file 'bitbucket-pipelines.yml'.
Examine file '.gitignore'.
Examine folder 'Scripts'.
Examine file 'run_chrome.bat'.
Examine folder 'settings'.
Examine file 'run_chrome.sh'.
Examine folder '.git'.
Examine file 'entityReference.index'.
Examine file 'console.properties'.
Examine folder 'Data'.
Examine file 'run_firefox.sh'.
Examine file '.travis.yml'.
Examine file 'build.gradle'.
Examine file 'Dockerfile'.
Examine file 'katatlon-test.sh'.
Examine folder '.cache'.
Examine file 'README.md'.
Examine file 'docker-compose.yml'.
Examine folder '.harness'.
Examine file 'LICENSE'.
Examine file 'Jenkinsfile'.
Examine folder 'Test Suites'.
Examine folder '.github'.
Examine file 'cloudbuild.yaml'.
Examine folder 'Test Listeners'.
Examine folder 'Object Repository'.
Examine file 'archive.bat'.
Examine folder 'androidapp'.
Examine folder 'Test Cases'.
Examine file 'GlobalVariables.glbl'.
Examine file 'codeship-steps.yml'.
Examine file 'test.prj'.
Found project file '/builds/projet-et-applications-it/Katalon/test.prj'.
Examine file '.gitlab-ci.yml'.
Examine folder 'Profiles'.
Examine folder 'Keywords'.
Examine file 'buildspec.yml'.
Cleaning up workspace
Opening project file: /builds/projet-et-applications-it/Katalon/test.prj
Generating global variables...
Project 'Oxygène_tests' opened
Failed to activate with TestCloud license. Failed to get organization or project info
Activated successfully with Katalon Runtime Engine license. 
Failed to activate with TestCloud license. 
Start reloading plugins...
Katalon version: 10.2.0
Plugin info URL: https://store.katalon.com/api/products/ks?appVersion=10.2.0&appType=ENGINE&licenseType=ENTERPRISE
Test suite 'Test Suites/Collections/test_immo' not found.
Start clean up session
End clean up session
All launchers terminated
+ ret_code=4
+ exit 4
❌  La collection test_immo a échoué (exit=4)
Uploading artifacts for failed job 00:00
Uploading artifacts...
tmp/Katalon/: found 2 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  correlation_id=01K0EAWCD5XAJK5P4BK2M82GXB id=8774 responseStatus=201 Created token=64_zGmz68
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 4

See the code :

katalon_job:
  extends:
    - .base_job
  stage: katalon
  rules:
    - if: '$CI_COMMIT_TITLE =~ /(?i)\[force[- ]?katalon?\]/'
      when: always
    - when: never
  image: katalonstudio/katalon:10.2.0 # The latest tag may NOT always support linux/arm64. Always check if linux/arm64 is available on the specified tag https://hub.docker.com/r/katalonstudio/katalon/tags
  services:
    - docker:dind
    - name: selenium/standalone-chromium:latest
      alias: selenium
  script:
      # ───────── Clonage du projet Katalon ─────────
      - KATALON_PROJECT_GIT_URI=${CI_SERVER_HOST}/${KATALON_PROJECT_DIR_BASE}.git
      - rm -rf "$KATALON_PROJECT_DIR"
      - git clone "https://gitlab-ci-token:${CI_JOB_TOKEN}@${KATALON_PROJECT_GIT_URI}" "$KATALON_PROJECT_DIR"

      # ───────── Prépare le dossier de logs ─────────
      - mkdir -p tmp/Katalon/

      # ───────── Exécute chaque collection trouvée ─────────
      - |
        set +e
        echo "🔎 Recherche des Test Suite Collections..."
        mapfile -d '' TSC_FILES < <(find "$KATALON_PROJECT_DIR/Test Suites/Collections" -name "*.tsc" -print0)

        if [ ${#TSC_FILES[@]} -eq 0 ]; then
          echo "❌  Aucune collection *.tsc trouvée sous Test Suites/Collections/"
          exit 1
        fi

        GLOBAL_EXIT=0
        for FILE in "${TSC_FILES[@]}"; do
          # Extract relative path without project directory prefix
          TSC_PATH="${FILE#"$KATALON_PROJECT_DIR/Test Suites/Collections/"}"
          TSC_PATH="${TSC_PATH%.tsc}"

          echo "Katalon will look for: $KATALON_PROJECT_DIR/Test Suites/Collections/$TSC_PATH.tsc"
          ls -l "$KATALON_PROJECT_DIR/Test Suites/Collections/$TSC_PATH.tsc"

          echo "🚀  Exécution de la collection : $TSC_PATH"

          katalonc.sh \
            -projectPath="$KATALON_PROJECT_DIR" \
            -apiKey="$KATALON_API_KEY" \
            -retry=0 \
            -statusDelay=20 \
            -browserType="Remote" \
            -remoteWebDriverUrl="http://selenium:4444/wd/hub" \
            -remoteWebDriverType="Selenium" \
            -testSuiteCollectionPath="Test Suites/Collections/$TSC_PATH"  # Correct relative path

          CODE=$?

          # Sauvegarde le log de session dans un fichier dédié
          session_log="$(ls -td /tmp/session-* | head -n 1)/.metadata/.log"
          cp "$session_log" "tmp/Katalon/$(basename "${TSC_PATH//\//_}").log" || true

          if [ $CODE -ne 0 ]; then
            echo "❌  La collection $TSC_PATH a échoué (exit=$CODE)"
            GLOBAL_EXIT=$CODE
          fi
        done

        exit $GLOBAL_EXIT

  artifacts:
     when: always
     paths:
       - tmp/Katalon/
     expire_in: 1 week

And see the content of my collection file :

<?xml version="1.0" encoding="UTF-8"?>
<TestSuiteCollectionEntity>
   <description></description>
   <name>test_immo</name>
   <tag></tag>
   <delayBetweenInstances>0</delayBetweenInstances>
   <executionMode>SEQUENTIAL</executionMode>
   <maxConcurrentInstances>8</maxConcurrentInstances>
   <testSuiteRunConfigurations>
      <TestSuiteRunConfiguration>
         <configuration>
            <groupName>Web Desktop</groupName>
            <profileName>default</profileName>
            <requireConfigurationData>false</requireConfigurationData>
            <runConfigurationId>Remote</runConfigurationId>
         </configuration>
         <runEnabled>true</runEnabled>
         <testSuiteEntity>Test Suites/Back-Office/Gestion/Immobilisation/Acceptation demande immobilisation</testSuiteEntity>
      </TestSuiteRunConfiguration>
      <TestSuiteRunConfiguration>
         <configuration>
            <groupName>Web Desktop</groupName>
            <profileName>default</profileName>
            <requireConfigurationData>false</requireConfigurationData>
            <runConfigurationId>Remote</runConfigurationId>
         </configuration>
         <runEnabled>true</runEnabled>
         <testSuiteEntity>Test Suites/Back-Office/Gestion/Immobilisation/Modifier Immobilisation</testSuiteEntity>
      </TestSuiteRunConfiguration>
      <TestSuiteRunConfiguration>
         <configuration>
            <groupName>Web Desktop</groupName>
            <profileName>default</profileName>
            <requireConfigurationData>false</requireConfigurationData>
            <runConfigurationId>Remote</runConfigurationId>
         </configuration>
         <runEnabled>true</runEnabled>
         <testSuiteEntity>Test Suites/Back-Office/Gestion/Immobilisation/Refuser demande immobilisation</testSuiteEntity>
      </TestSuiteRunConfiguration>
   </testSuiteRunConfigurations>
</TestSuiteCollectionEntity>

Thank you for your help …

Dimitri

1 Like

your test cloud license active and valid? @dimitri.ouen

Failed to activate with TestCloud license. Failed to get organization or project info
Activated successfully with Katalon Runtime Engine license. 
Failed to activate with TestCloud license.

Key Findings from Your Logs

  1. File Exists Confirmed:

bash

Katalon will look for: /builds/projet-et-applications-it/Katalon/Test Suites/Collections/test_immo.tsc
-rw-r--r-- 1 root root 1940 Jul 18 08:37 .../Collections/test_immo.tsc

The file is present and accessible.
2. Katalon’s Error:

text

Test suite 'Test Suites/Collections/test_immo' not found.

The Root Cause

Katalon Studio expects the -testSuiteCollectionPath parameter to follow a virtual project structure, not the filesystem path. Your file organization in Git doesn’t match Katalon’s expected project structure.

Solution: Fix Project Structure

Katalon requires this structure:

text

ProjectRoot/
├── Test Suites/
│   ├── Collections/
│   │   └── YourCollection.tsc
│   └── OtherSuites/
└── test.prj  <-- MUST be at root

Your Issue: The test.prj file is buried under Test Suites/Collections/ instead of being at the project root.

Steps to Fix

  1. Reorganize Project Structure:

bash

# Move test.prj to root
git -C "$KATALON_PROJECT_DIR" mv 'Test Suites/Collections/test.prj' .

# Ensure test suites are in correct location
mkdir -p "$KATALON_PROJECT_DIR/Test Suites/Back-Office"
git -C "$KATALON_PROJECT_DIR" mv \
    'Test Suites/Collections/Back-Office/Gestion' \
    'Test Suites/Back-Office/'
  1. Update .tsc File References:
    Edit test_immo.tsc to use relative paths from project root:

xml

<testSuiteEntity>Test Suites/Back-Office/Gestion/Immobilisation/Acceptation demande immobilisation</testSuiteEntity>
  1. CI Script Adjustment:
    Simplify path handling:

text

for FILE in "${TSC_FILES[@]}"; do
  COLLECTION_NAME=$(basename "$FILE" .tsc)
  echo "🚀 Executing collection: $COLLECTION_NAME"
  
  katalonc.sh \
    -projectPath="$KATALON_PROJECT_DIR" \
    -testSuiteCollectionPath="Test Suites/Collections/$COLLECTION_NAME"
done

Verification Steps

Add this to your CI script before running tests:

bash

# Debug: Print project structure
echo "Project Structure:"
find "$KATALON_PROJECT_DIR" -mindepth 2 -type d | sort

# Debug: Verify test suites
grep -oP '(?<=<testSuiteEntity>)[^<]+' "$FILE" | while read -r suite; do
  suite_file="$KATALON_PROJECT_DIR/$suite.ts"
  echo "Checking test suite: $suite_file"
  ls -l "$suite_file"
done

Alternative Solution

If restructuring isn’t feasible, execute test suites directly:

bash

# Run all test suites in Collections directory
find "$KATALON_PROJECT_DIR/Test Suites/Collections" -name "*.ts" -print0 | while IFS= read -r -d 

Critical Notes

  1. Project Integrity:

bash

# After cloning, verify key files
ls -l "$KATALON_PROJECT_DIR/test.prj"

This file MUST exist at project root.
2. Path Consistency:
Katalon uses project-relative paths with:

  • Spaces preserved
  • Capitalization sensitive
  • Forward slashes (/) as separators
  1. Katalon Version:
    Consider upgrading to a version with ARM64 support:

text

image: katalonstudio/katalon:10.3.1  # Verify ARM64 support

Final Script Adjustment

text

script:
  - |
    # ... existing clone steps ...

    # Verify project structure
    if [ ! -f "$KATALON_PROJECT_DIR/test.prj" ]; then
      echo "❌ Missing test.prj at project root!"
      exit 1
    fi

    # Execute collections
    find "$KATALON_PROJECT_DIR/Test Suites/Collections" -name '*.tsc' -print0 | while IFS= read -r -d 

This approach ensures Katalon can resolve paths correctly based on its project structure requirements. The key is having test.prj at the root and maintaining consistent relative paths\0’ suite; do
REL_PATH=“${suite#”$KATALON_PROJECT_DIR/“}”
katalonc.sh … -testSuitePath=“${REL_PATH%.ts}”
done


## Critical Notes

1. **Project Integrity**:

bash

DISCOURSE_PLACEHOLDER_13


This file MUST exist at project root.
2. **Path Consistency**:
Katalon uses project-relative paths with:
  * Spaces preserved
  * Capitalization sensitive
  * Forward slashes (`DISCOURSE_PLACEHOLDER_14`) as separators
3. **Katalon Version**:
Consider upgrading to a version with ARM64 support:

text

DISCOURSE_PLACEHOLDER_15


## Final Script Adjustment

text

DISCOURSE_PLACEHOLDER_16


This approach ensures Katalon can resolve paths correctly based on its project structure requirements. The key is having `DISCOURSE_PLACEHOLDER_17` at the root and maintaining consistent relative paths\0' file; do
      collection_name=$(basename "$file" .tsc)
      katalonc.sh \
        -projectPath="$KATALON_PROJECT_DIR" \
        -testSuiteCollectionPath="Test Suites/Collections/$collection_name"
    done

This approach ensures Katalon can resolve paths correctly based on its project structure requirements. The key is having DISCOURSE_PLACEHOLDER_17 at the root and maintaining consistent relative paths\0’ suite; do
REL_PATH=“${suite#”$KATALON_PROJECT_DIR/“}”
katalonc.sh … -testSuitePath=“${REL_PATH%.ts}”
done


## Critical Notes

1. **Project Integrity**:

This file MUST exist at project root.
2. **Path Consistency**:
Katalon uses project-relative paths with:
  * Spaces preserved
  * Capitalization sensitive
  * Forward slashes (`DISCOURSE_PLACEHOLDER_14`) as separators
3. **Katalon Version**:
Consider upgrading to a version with ARM64 support:


This approach ensures Katalon can resolve paths correctly based on its project structure requirements. The key is having `DISCOURSE_PLACEHOLDER_17` at the root and maintaining consistent relative paths
1 Like