Giter Site home page Giter Site logo

katalon-studio-samples / ci-samples Goto Github PK

View Code? Open in Web Editor NEW
54.0 12.0 170.0 2.37 MB

Sample configurations for various CI systems.

License: Apache License 2.0

Groovy 79.02% TypeScript 16.05% Shell 2.41% Batchfile 2.40% Dockerfile 0.11%
katalon-studio sample docker circleci2 jenkins shell azure-devops docker-compose cli

ci-samples's Introduction

web-samples

Companion products

Katalon TestOps

Katalon TestOps is a web-based application that provides dynamic perspectives and an insightful look at your automation testing data. You can leverage your automation testing data by transforming and visualizing your data; analyzing test results; seamlessly integrating with such tools as Katalon Studio and Jira; maximizing the testing capacity with remote execution.

Katalon Studio

Katalon Studio is a free and complete automation testing solution for Web, Mobile, and API testing with modern methodologies (Data-Driven Testing, TDD/BDD, Page Object Model, etc.) as well as advanced integration (JIRA, qTest, Slack, CI, Katalon TestOps, etc.). Learn more about Katalon Studio features.

ci-samples's People

Contributors

anhqle1996 avatar castellogovender avatar coty avatar devalex88 avatar duyluonganh avatar hieubui419 avatar katalon-service avatar minhhai2209 avatar padoplin avatar thongnmtran avatar yen8298 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ci-samples's Issues

unknown flag: --config Error

Hi Team,

When I pass the proxy details using --config. I got unknown flag error. Kindly let me know how to fix it.

Thanks,
Siva

Docker Desktop Mac - run_chrome.sh / run_firefox.sh

Hello,

I'm new to docker but I have docker for desktop running on Mac. A Katalan Studio project example named "TestProject" and the following "run_chrome.sh" and/or "run_firefox.sh" scripts. My bash/sh path set.

#!/bin/sh

set -xe

rm -rfv ./reports/chrome
mkdir -p ./reports/chrome

docker run -t --rm -v "$(pwd)"/TestProject:/katalon/katalon/source "$(pwd)"/reports/chrome:/katalon/katalon/report katalonstudio/katalon katalon-execute.sh -browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/TestProjectAll"

 
Now when I run these scripts I get the following error:

docker: invalid reference format: repository name must be lowercase

I have attempted to place the project outside Katalon Studio/ (to avoid folder with space) and I have attempted to rename the project folder to lowercase and project name in script.

I understand this is a docker thing but any reply/fix would be very helpful

Why do i have to run as root?

Hello,

in the example Jenkinsfile it says that i have to run the container as the root user? Why is that? That means it will create any reports, logs and similar as the root user aswell meaning the Jenkins-user (who isn't root) will be unable to remove the workspaces that contains files it may not touch.

    agent {
        docker {
            image 'katalonstudio/katalon'
            args "-u root"
        }
    }

Cannot send request, retry to send. No proxy found.

Hi @devalex88 ,

This is related to issue. First of all thanks for clarifying it. I am able to pass the proxy information successfully. However the browser is not able to launch the URL.

run_Chrome.sh

#!/usr/bin/env bash

set -xe

current_dir=$(pwd)
project_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
reports_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )/Reports/WorkFlow Sprints"

rm -rfv "$reports_dir"
mkdir -p "$reports_dir"

katalon_opts='-browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/EPS Admin - WorkFlow Sprints" --config -proxy.option=MANUAL_CONFIG -proxy.server.type=HTTP -proxy.server.address=MyProxyIP -proxy.server.port=8080 -proxy.username=MyProxyUserName -proxy.password=MyProxyPassword'
docker run --rm -v "/$project_dir":/katalon/katalon/source:ro -v "/$reports_dir":/katalon/katalon/report -e KATALON_OPTS="$katalon_opts" katalonstudio/katalon

cd $current_dir

Log info:
Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 9341
Only local connections are allowed.


Test Suites/ Sprints - Chrome - 20180523_195531......0/1(0%)

May 23, 2018 7:56:00 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
05-23-2018 07:56:00 PM - [RUN_DATA] - Logging run data 'sessionId' with value '8b1b50fe0cde940ccd87c9ec659a672d'
05-23-2018 07:56:00 PM - [RUN_DATA] - Logging run data 'browser' with value 'Chrome 66.0.3359.139'
05-23-2018 07:56:00 PM - [RUN_DATA] - Logging run data 'platform' with value 'Linux'
05-23-2018 07:56:00 PM - [RUN_DATA] - Logging run data 'seleniumVersion' with value '3.7.1'
05-23-2018 07:56:00 PM - [RUN_DATA] - Logging run data 'proxyInformation' with value 'ProxyInformation{proxyOption=MANUAL_CONFIG, proxyServerType=HTTP, password=MyProxyPassword, proxyServerAddress=MyProxyIP, proxyServerPort=8080}'
05-23-2018 07:56:00 PM - [INFO] - Navigating browser to: 'http://www.google.com'

Wed May 23 19:57:34 UTC 2018
Cannot send request, retry to send.

No proxy found.

Wed May 23 19:57:44 UTC 2018
Cannot send request, retry to send.

No proxy found.


Test Suites/ Sprints - Chrome - 20180523_195531......0/1(0%)

[1527105660.399][SEVERE]: Timed out receiving message from renderer: 296.753
[1527105660.429][SEVERE]: Timed out receiving message from renderer: -0.031
[1527105660.507][SEVERE]: Timed out receiving message from renderer: -0.110
05-23-2018 08:01:00 PM - [FAILED] - Unable to open browser with url: 'www.google.com' (Root cause: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=66.0.3359.139)
(Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.9.93-boot2docker x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '439814915e89', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.93-boot2docker', java.version: '1.8.0_162'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528139 (47ead77cb35ad2..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false,
handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: tru
e, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 66.0.3359.139, webStorageEnabled: true}
Session ID: 8b1b50fe0cde940ccd87c9ec659a672d)
05-23-2018 08:01:00 PM - [END] - End action : openBrowser
05-23-2018 08:01:00 PM - [FAILED] - Test Cases/SampleTestTable FAILED because (of) Unable to open browser with url: 'www.google.com' (Root cause: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=66.0.3359.139)
(Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.9.93-boot2docker x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '439814915e89', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.93-boot2docker', java.version: '1.8.0_162'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528139 (47ead77cb35ad2..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false,
handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: tru
e, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 66.0.3359.139, webStorageEnabled: true}
Session ID: 8b1b50fe0cde940ccd87c9ec659a672d)


Test Suites/ Sprints - Chrome - 20180523_195531......0/1(0%)

sample works on local machine but doesn't work on digital ocean droplet

root@pratiche-debian-test:~/quiz-katalon# ./run_chrome.sh
++ pwd
+ current_dir=/root/quiz-katalon
+++ dirname ./run_chrome.sh
++ cd .
++ pwd
+ project_dir=/root/quiz-katalon
+++ dirname ./run_chrome.sh
++ cd ./..
++ pwd
+ reports_dir=/root/reports/firefox
+ rm -rfv /root/reports/firefox
removed '/root/reports/firefox/report.csv'
removed '/root/reports/firefox/execution0.log'
removed '/root/reports/firefox/report.html'
removed '/root/reports/firefox/JSON_Report.json'
removed '/root/reports/firefox/JUnit_Report.xml'
removed '/root/reports/firefox/execution.properties'
removed directory: '/root/reports/firefox'
+ mkdir -p /root/reports/firefox
+ katalon_opts='-browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/FirstTest"'
+ docker run --rm -v /root/quiz-katalon:/katalon/katalon/source:ro -v /root/reports/firefox:/katalon/kata
lon/report -e 'KATALON_OPTS=-browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/F
irstTest"' katalonstudio/katalon:1.2.0
Google Chrome 66.0.3359.139
Mozilla Firefox 59.0.2
Katalon Studio 5.4.1
+ echo 'Starting Katalon Studio'
Starting Katalon Studio
++ pwd
+ current_dir=/
+ tmp_dir=/katalon/katalon/tmp
+ mkdir -p /katalon/katalon/tmp
+ chmod -R 777 /katalon/katalon/tmp
+ project_dir=/katalon/katalon/project
+ mkdir -p /katalon/katalon/project
+ cp -r /katalon/katalon/source/. /katalon/katalon/project
+ touch /katalon/katalon/project/.classpath
+ chmod -R 777 /katalon/katalon/project
+ report_dir=/katalon/katalon/report
+ mkdir -p /katalon/katalon/report
+ chmod -R 777 /katalon/katalon/report
++ find /katalon/katalon/project -maxdepth 1 -type f -name '*.prj'
+ project_file=/katalon/katalon/project/quiz-cms.prj
+ cmd='/opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath=/ka
talon/katalon/project/quiz-cms.prj -browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test S
uites/FirstTest"'
+ /katalon/base/scripts/xvfb.sh start
+ XVFB=/usr/bin/Xvfb
+ XVFBARGS=':99 -screen 0 1024x768x24 -fbdir /var/run -ac'
+ PIDFILE=/var/run/xvfb.pid
+ case "$1" in
+ echo -n 'Starting virtual X frame buffer :99 1024x768x24'
+ start-stop-daemon --start --quiet --pidfile /var/run/xvfb.pid --make-pidfile --background --exec /usr/b
in/Xvfb -- :99 -screen 0 1024x768x24 -fbdir /var/run -ac
Starting virtual X frame buffer :99 1024x768x24+ echo .
+ exit 0
.
+ cd /katalon/katalon/tmp
+ eval '/opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath=/k
atalon/katalon/project/quiz-cms.prj -browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test
Suites/FirstTest"'
++ /opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath=/katalo
n/katalon/project/quiz-cms.prj -browserType=Firefox -retry=0 -statusDelay=15 '-testSuitePath=Test Suites/
FirstTest'
Request sent successfully.
Starting Groovy-Eclipse compiler resolver.  Specified compiler level: unspecified
133 2.4.7.xx-201611170128-e46 = ACTIVE

--------------------------------------------------------------------------------
Test Suites/FirstTest - Firefox - 20180820_145442........................0/1(0%)
--------------------------------------------------------------------------------

Request sent successfully.
08-20-2018 02:54:48 PM - [START]  - Start Test Suite : Test Suites/FirstTest
08-20-2018 02:54:49 PM - [RUN_DATA] - Logging run data 'hostName' with value 'root - 9cda166d3ac0'
08-20-2018 02:54:49 PM - [RUN_DATA] - Logging run data 'os' with value 'Linux 64bit'
08-20-2018 02:54:49 PM - [RUN_DATA] - Logging run data 'hostAddress' with value '172.17.0.3'
08-20-2018 02:54:49 PM - [RUN_DATA] - Logging run data 'katalonVersion' with value '5.4.1.1'
08-20-2018 02:54:51 PM - [START]  - Start Test Case : Test Cases/login
08-20-2018 02:54:51 PM - [INFO]   - Evaluating variables for test case
08-20-2018 02:54:54 PM - [START]  - Start action : openBrowser

--------------------------------------------------------------------------------
Test Suites/FirstTest - Firefox - 20180820_145442........................0/1(0%)
--------------------------------------------------------------------------------

Copying report to folder /katalon/katalon/report...

--------------------------------------------------------------------------------
Test Suites/FirstTest - Firefox - 20180820_145442........................0/1(0%)
--------------------------------------------------------------------------------

+ cd /
+ cd /root/quiz-katalon
root@pratiche-debian-test:~/quiz-katalon# ls

test is passing if i run the exact same ./run_firefox.sh on my local machine, but if I run it in DO droplet I am getting the log as above... for some reason it is failing at 'openBrowser' step. what can be wrong? docker image tested on droplet? it should be working on droplet since it works on a local machine....

Add samples for CIs

  • Azure Devops Services
  • AppVeyor
  • AWS CodeBuild
  • Bitbucket
  • BuildKite
  • Circle CI
  • CLI
  • CodeShip
  • Concourse
  • GitLab
  • Heroku CI
  • Jenkins
  • Semaphore
  • Shippable
  • Solano
  • TravisCI
  • VSTS CI

Requests

Hello,
I am trying to integrate Katalon Docker into CircleCI which is our default CI env. Travis.io works the same way and I am guessing other online CI envs work the same way, so this should be helpful to you for integrating Katalon with online CI envs.
I am able to pull in the latest docker, unfortunately, it is actually putting me in the docker env instead of starting the docker command. So, I had a couple of requests:

  1. Can you share the actual script / command which you are launching inside the docker? I need to call it directly once I have downloaded the Katalon docker version and am inside the docker image.
  2. Can you start versioning the images? I need at least one stable version so my tests don't fail if you accidentally push out an invalid image.
  3. Nice to have - Make the Katalon directory from where it picks up the test files configurable - Currently it looks like this is hard coded to "/katalon/katalon/source". Can we pass this an option on the command line?
  4. Nice to have - Make the reports directory configurable - Currently it looks like it hardcoded to "/katalon/katalon/reports"

Thanks,
Nanda

Volume mounts issue in Windows

In case anyone running the sample code in windows: you need to add a slash in front of the directories in the docker command. Otherwise, docker can't find the folder to mount.

e.g.
instead of "... docker run --rm -v "$project_dir":/katalon/katalon/source:ro ...", you need to add a slash before "$project_dir". Like "... docker run --rm -v "/$project_dir":/katalon/katalon/source:ro ...".

Incorrect Parameter Name Used in workflows yml file (windows.yml): -testSuiteCollectionPath Instead of -testSuitePath

I noticed there is incorrect documention for katalon integration with github action workflows.
In the documentation, the parameter -testSuiteCollectionPath is mentioned for specifying the path for the test suite collection. However, Based on my experience and testing , it seems that the correct parameter name should be -testSuitePath .
The observed Result will be test suite will not be found if you use -testSuiteCollectionPath.
The correct simple implementation of the workflow yml should be

name: CI
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: windows-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Katalon Studio Github Action
      uses: katalon-studio/katalon-studio-github-action@v2
      with:
          version: '7.5.5'
          projectPath: '${{ github.workspace }}'
          args: '-noSplash -retry=0 -browserType=Chrome -statusDelay=15 -testSuitePath="Test Suites/TestSuiteDemo" -apiKey= ${{ secrets.KATALON_API_KEY}} --config -webui.autoUpdateDrivers=true'

sample doesn't work

Hi,
I'm trying to execute this example, but I got an error when run
./katalon/run_chrome.sh
./katalon/run_firefox.sh
I got the same error.
could anybody help me?
( i'm using mac os)
`Request sent successfully.
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
133 2.4.7.xx-201611170128-e46 = ACTIVE
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.
[Fatal Error] :1:1: Premature end of file.


Test Suites/TS_RegressionTest - Firefox - 20180627_151445................0/2(0%)

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/katalon/katalon/project/Libs/TempTestSuite1530112485582.groovy: 14: unable to resolve class internal.GlobalVariable
@ line 14, column 1.
import internal.GlobalVariable as GlobalVariable
^

1 error

Request sent successfully.


Test Suites/TS_RegressionTest - Firefox - 20180627_151445................0/2(0%)

`

Could not find .prj file in source folder

I am running Katalon image using Docker for Windows.
I meet an issue that the projectfile could not be found in source folder so the katalon execution command failed:
C:\Users\minhdoan\kat-docker-examples\docker-images-samples (master -> origin)
λ bash .\katalon\run_chrome.sh
++ pwd

  • current_dir=/c/Users/minhdoan/kat-docker-examples/docker-images-samples
    +++ dirname '.\katalon\run_chrome.sh'
    ++ cd '.\katalon'
    ++ pwd
  • project_dir=/c/Users/minhdoan/kat-docker-examples/docker-images-samples/katalon
    +++ dirname '.\katalon\run_chrome.sh'
    ++ cd '.\katalon/..'
    ++ pwd
  • reports_dir=/c/Users/minhdoan/kat-docker-examples/docker-images-samples/reports/chrome
  • rm -rfv /c/Users/minhdoan/kat-docker-examples/docker-images-samples/reports/chrome
    removed directory '/c/Users/minhdoan/kat-docker-examples/docker-images-samples/reports/chrome'
  • mkdir -p /c/Users/minhdoan/kat-docker-examples/docker-images-samples/reports/chrome
  • katalon_opts='-browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="\Test Suites\TS_RegressionTest"'
  • docker run --rm -v //c/Users/minhdoan/kat-docker-examples/docker-images-samples/katalon:/katalon/katalon/source:ro -v /c/Users/minhdoan/kat-docker-examples/docker-images-samples/reports/chrome:/katalon/katalon/report -e 'KATALON_OPTS=-browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="\Test Suites\TS_RegressionTest"' katalonstudio/katalon
    Google Chrome 64.0.3282.186
    Mozilla Firefox 58.0.2
    Katalon Studio 5.3.1
    Starting Katalon Studio
  • echo 'Starting Katalon Studio'
    ++ pwd
  • current_dir=/
  • tmp_dir=/katalon/katalon/tmp
  • mkdir -p /katalon/katalon/tmp
  • chmod -R 777 /katalon/katalon/tmp
  • project_dir=/katalon/katalon/project
  • mkdir -p /katalon/katalon/project
  • cp -r /katalon/katalon/source/. /katalon/katalon/project
  • touch /katalon/katalon/project/.classpath
  • chmod -R 777 /katalon/katalon/project
  • report_dir=/katalon/katalon/report
  • mkdir -p /katalon/katalon/report
  • chmod -R 777 /katalon/katalon/report
    ++ find /katalon/katalon/project -maxdepth 1 -type f -name '*.prj'
  • project_file=
  • cmd='/opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath= -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="\Test Suites\TS_RegressionTest"'
  • /katalon/base/scripts/xvfb.sh start
  • XVFB=/usr/bin/Xvfb
  • XVFBARGS=':99 -screen 0 1024x768x24 -fbdir /var/run -ac'
  • PIDFILE=/var/run/xvfb.pid
  • case "$1" in
  • echo -n 'Starting virtual X frame buffer :99 1024x768x24'
    Starting virtual X frame buffer :99 1024x768x24+ start-stop-daemon --start --quiet --pidfile /var/run/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -fbdir /var/run -ac
    .
  • echo .
  • exit 0
  • cd /katalon/katalon/tmp
  • eval '/opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath= -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="\Test Suites\TS_RegressionTest"'
    ++ /opt/katalonstudio/katalon -runMode=console -reportFolder=/katalon/katalon/report -projectPath= -browserType=Chrome -retry=0 -statusDelay=15 '-testSuitePath=\Test Suites\TS_RegressionTest'
    Invalid argument: Cannot find project '-browserType=Chrome'.

It seems the line of code did not works for me:
+ cp -r /katalon/katalon/source/. /katalon/katalon/project
so the project file could not be found:
find /katalon/katalon/project -maxdepth 1 -type f -name '*.prj'

Please help to clarify it and any fix/work around on it!
Thanks!

run katalon in docker windows 10 - beginner

Hi guys, I try to run in the catalon test suite collection in windows 10 in docker, but I do not know the syntax structure. Would anyone be willing to help me run the test in the docker?

Here is we generate commnad from katalon:
katalon -noSplash -runMode = console -projectPath = "C: \ Users \ murban \ Katalon Studio \ AutomatTestCRM \ AutomatTestCRM_new.prj" -retry = 0 -testSuiteCollectionPath = "Test Suites / TestSuiteCollectionParallel / ParallelTest"

I have created in project folder: run_chrome.sh. What do I have to write into him?

I tried this, but it did not work :

docker run --rm -v //c/Users/murban/Katalon Studio\AutomatTestCRM/katalon:/katalon/katalon/source:ro -v /c/Users/murban/Katalon Studio\AutomatTestCRM/reports/chrome:/katalon/katalon/report -e 'KATALON_OPTS=-browserType="Chrome" -retry=0 -statusDelay=15 -testSuiteCollectionPath="Test Suites/TestSuiteCollectionParallel/ParallelTest"' katalonstudio/katalon

Thank you very much for your help.

Docker Compose Example?

Hi katalon community and devs!

I have a small contribution. I noticed out of all the ci yaml files, there was no docker-compose, so I made a real nice and easy one. All you need to do is add the docker-compose.yml file to the top level of your project.

docker-compose.yml

version: "3.7"
services:
  katalon:
    image: katalonstudio/katalon:latest
    container_name: katalon
    hostname: katalon
    volumes: 
      - .:/katalon/katalon/source
    entrypoint: katalon-execute.sh
    command: -propertiesFile=/katalon/katalon/source/console.properties

Notice the command only needs a properties file which should already exist at the top level of your project, if not add it and use the code below. Probably best to remove empty variables from the file if they are unused.

console.properties

browserType=Chrome (headless)
retry=0
testSuitePath=Test Suites/TS_RegressionTest
executionProfile=default
deviceId=
kobitonDeviceId=
qTestDestId=
qTestDestType=
remoteWebDriverType=Selenium
remoteWebDriverUrl=

Then you may simply run docker-compose up and voila!

I believe this is the easiest way to run a katalon test through Docker locally, the equivalent docker command is quite large and hard to read.

Here is another way to do the same without the properties file. However it is not as dynamic as using the properties file as you would have to edit the docker-compose.yml file.

docker-compose.yml

version: "3.7"
services:
  katalon:
    image: katalonstudio/katalon:latest
    container_name: katalon
    hostname: katalon
    volumes: 
      - .:/katalon/katalon/source
    entrypoint: katalon-execute.sh
    command: 
      - -browserType="Chrome"
      - -retry=0
      - -statusDelay=15
      - -testSuitePath="Test Suites/TS_RegressionTest"

I would also like to see this as an example in katalon-studio/docker-images Readme file as another use-case. This would be consistent with most docker images readme files because why not have a docker-compose example.

Enjoy!

Activation failed. Please make sure you are using a valid license.

I am getting this error and I don't know how to go about it. I am running Katalon docker image in Jenkins pipeline

Jenkins Pipeline Sample

pipeline {
agent {
docker {
image 'katalonstudio/katalon'
args "-u root"
}
}
stages {
stage('Test') {
steps {
sh 'katalonc.sh -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/TS_RegressionTest"'
}
}
}
post {
always {
archiveArtifacts artifacts: 'report//.', fingerprint: true
junit 'report/
/JUnit_Report.xml'
}
}
}

Error message

  • Activating...
    Start activating offline...
    Search for valid offline licenses in folder: /root/.katalon/license
    The number of valid offline licenses: 0
    Offline activation failed.
    Start activating online...
    Online activation for console mode failed.
    Activation failed. Please make sure you are using a valid license.
    All launchers terminated
    ret_code=3
    exit 3

CI Gitlab katalonstudio error

Hello,` I'm trying to access to /opt/katalonstudio/config folder in order to get session logs.

I tried with this gitlab-ci config but does not seems to be attached as artifact. Any tip? Thanks!

image: katalonstudio/katalon
services:
  - docker:dind

stages:
  - test

e2e_job:
  stage: test
  script:
    - katalon-execute.sh -browserType="Chrome" -retry=0 -statusDelay=15 -testSuitePath="/tmp/katalon_execute/project/"
  artifacts:
    name: "$CI_COMMIT_REF_NAME"
    paths:
      - report/
      - /opt/katalonstudio/config
    reports:
      junit:
      - 'report/*.xml'
    when: always
  rules:
    - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"' # This rule will be evaluated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.