How do I run Katalon test suite in Jenkins inside Docker

Viewed 5501

I have a Katalon test suite setup and it runs great in the UI and from the CLI on the machine where I have Katalon studio installed.

I have Jenkins CI server running in a docker container, and I would like to setup a job to run my test suite on that Jenkins server.

What runtime do I need on the Jenkins server so it can run a Katalon job? Is there a runtime or a plugin for Jenkins for this?

If not, is there a docker container for Katalon that I can use to remotely run the job via jenkins, like the SonarQube stuff?

5 Answers

Okay i found it out: use the "sudo docker cp /sourcefolder/Katalon_folder/ ContainerId:/destination_folder"

The same goes for the script. Next step is to install Firefox / geckodriver.

Since the accepted answer is over two years long, some things have changed and there is now an official Docker image for Katalon at the Docker Hub:

docker pull katalonstudio/katalon

For sample project configuration for various CI tools go here.

Here is a sample Jenkins file:

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