A sample project of using Katalon Docker image with Google Cloud Build
-
A valid Katalon API Key
Refer to Generate API keys for more information about API key generation. -
Google Cloud Build API must be enabled for your Google Cloud project
-
Secret Manager API must be enabled for your Google Cloud project
-
Prepare a secret to store the Katalon API key
- Create a
cloudbuild.yaml
file at the root of your katalon project
steps:
- name: 'docker'
args: ['pull', 'katalonstudio/katalon']
- name: 'docker'
entrypoint: 'sh'
args: ['-c', 'docker run -t --rm -v /workspace:/tmp/project katalonstudio/katalon katalonc.sh -projectPath=/tmp/project -browserType="Chrome" -retry=0 -retryStrategy=immediately -testSuiteCollectionPath="Test Suites/Simple Test Suite Collection" --config -webui.autoUpdateDrivers=true -apiKey=$$KATALON_API_KEY']
secretEnv: ['KATALON_API_KEY']
availableSecrets:
secretManager:
- versionName: projects/$PROJECT_ID/secrets/KATALON_API_KEY/versions/1
env: 'KATALON_API_KEY'
- You may also like to enable Katalon TestOps Integration from your
Project settings
so you can view the reports after the execution.
Now to run the test, you only need to create a trigger on the cloud build and run it manually or automatically
You can refer to the following document to create a build trigger: Creating a build trigger
Now you can run the newly created trigger manually from Trigger Manager page, or base on the type of the trigger, it can also be triggered automatically.
After triggering the build, you can go to History tab on the Google Cloud Build and watch the progress.
To view the reports from the build, you can enable Katalon TestOps Integration on your project. After that, every report will be uploaded automatically to the TestOps server and you can go there to see the testing results.