Online Training: Web test automation with CodeceptJS. Sign up now!

CodeceptJS - Jenkins Integration

Recently, I have chance to play around with setting up the smoke tests using Codeceptjs - Jenkins CI. Hence, that would be a good time to write down something for anyone that has troubles with Codeceptjs - Jenkins will have a reference.

I’m using this project in this setup:



  1. Create a new pipeline job on Jenkins

  2. Configure it as following

script path is like this jenkins/Jenkinsfile cause that the path of script in my repo, it could be different with yours.

  1. Create Dockerfile, to build the image. Can refer to this

  2. Create Jenkinsfile, to use for Jenkins pipeline. Can refer to this

node {

    def imageTag = "peterngtr/rest-demo:${env.BUILD_NUMBER}"
    def dockerHome = tool 'myDocker'

    stage("Initializing") {
        checkout scm;
        sh 'git reset --hard'
        env.PATH = "${dockerHome}/bin:${env.PATH}"

    stage("Building Images") {
        sh "docker build -t ${imageTag} -f docker/Dockerfile ."

    stage("Running Tests") {
        try {
            sh "jenkins/ ${env.BUILD_NUMBER}"
        finally {
            sh "ls report/"
            allure includeProperties: false, jdk: '', results: [[path: 'report']]

#!/usr/bin/env bash


echo "Pulling image ${VERSION}"
mkdir report

docker run --rm \
    -v "$(pwd)"/report/:/app/report/ \


echo "Final status ${status}"
exit ${status}
  1. Trigger the build and enjoy the coffee :slight_smile:


Hi, this is great! I just have one question. Do you have a specific configuration for Allure? I’ve never been able to see the test trends like in the screenshot you shared

Hi @ufko, I didn’t setup anything else beside the defaults. But yeah, that trend looks cool!

It’s really cool :smiley: Thanks!