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 !