Qase Docs
Help CenterAPI DocsRoadmapSign up for free
  • General
    • Qase docs
    • Get started with the Qase platform
      • Account settings
      • Projects
      • Test suites
      • Test cases
        • Test Case Parameters
        • Test case review
        • Shared steps
        • Import test cases
        • Export test cases
        • Trash bin
        • Muted Tests
        • System fields
        • Nested steps
        • Test case actions
        • Filters
      • Requirements Traceability Report
      • AI Test Case Generator
    • Execute testing
      • Test plan
      • Test runs
      • Configurations
      • Environments
    • Issues tracking
      • Defects
      • Milestones
      • Requirements
    • Analytics
      • Dashboards
      • Queries (QQL, Qase Query Language)
      • Saved queries
    • Webhooks
      • Test Case
      • Test suite
      • Test plan
      • Shared step
      • Milestone
      • Custom field
      • Test run
      • Defect
      • Test review
  • AIDEN
    • AIDEN - QA Architect
  • Guide: Action editor
  • Administration
    • Workspace management
      • Users
      • Invites
      • Groups
      • Roles
      • Fields
      • Custom fields
      • Notifications
      • Tags
      • Attachments
      • Audit logs
      • Hotkeys
    • SSO / SAML instructions
      • AzureAD
      • OneLogin
      • Google Workspace
      • Okta
      • JumpCloud
    • SCIM
      • User lifecycle management with SCIM
      • Enable SCIM
      • Users
      • Discovery features
      • Errors
    • Security
      • SOC 2 Type II / SOC 3
      • ISO/IEC 27001:2022
      • Penetration testing report
      • Subprocessors
      • Qase IP addresses
    • Billing
      • Billing options
    • Subscriptions
      • Free plan
      • Startup plan
      • Business plan
      • Enterprise plan
  • Apps
    • Issue tracking
      • Jira Cloud
      • Jira Server/Datacenter Plugin installation
      • GitHub
      • Asana
      • Linear
      • Monday
      • ClickUp
      • Trello
      • Azure DevOps
      • GitLab
      • YouTrack
      • Redmine
    • CI/CD
      • Jenkins
      • BitBucket
      • GitHub CI
      • GitLab CI
    • Chats
      • Slack
  • Automation
    • Qase API
    • Reporters
      • JavaScript
        • Playwright
        • Cypress
        • Mocha
        • Newman
        • Jest
        • WebDriverIO
        • CucumberJS
        • TestCafe
      • Python
        • Pytest
        • Robot Framework
        • Behave
        • Tavern
      • Java
        • TestNG
        • JUnit 4
        • JUnit 5
        • Cucumber 3 (jvm)
        • Cucumber 4 (jvm)
        • Cucumber 5 (jvm)
        • Cucumber 6 (jvm)
        • Cucumber 7 (jvm)
      • PHP
        • PHPUnit
        • Codeception
      • Kotlin
        • Kaspresso
    • Qase CLI App
      • XCTest
Powered by GitBook
On this page
  • What is Jenkins?
  • Why use Jenkins integration?
  • How to install Jenkins?
  • Usage
  • How to use Jenkins with Qase reporters?
  1. Apps
  2. CI/CD

Jenkins

PreviousCI/CDNextBitBucket

Last updated 2 months ago

What is Jenkins?

Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server-based system that runs in servlet containers.

Why use Jenkins integration?

Qase integration for Jenkins allows you to start your automated runs directly from Qase, without the need to go to Jenkins to set them up separately.

How to install Jenkins?

  1. Log into your Jenkins instance.

  2. Create a Jenkins API token and copy it.

  3. Go to the apps page in Qase.

  4. Choose Jenkins app:

  1. Click the “Install now” button.

  1. Input your data in the form and press the “Install” button.

Usage

  1. Go to the Test Runs page.

  2. Click the “Start new test run” button

  3. Select "Automated" test run to be created:

  1. Select Jenkins CI/CD system:

  1. Then choose a "Job", which you want to start and fill in other parameters:

  1. Start the test run

You can observe the pipeline status:

...and the pipeline result:

How to use Jenkins with Qase reporters?

  1. Prepare a job that runs your tests.

  2. Configure a Qase reporter for your testing framework.

  3. Make your job parameterized:

  1. Add string parameters for the Qase reporter. They will be used to link test results with automated test runs and they will be filled in by Qase automatically:

  • QASE_PROJECT_CODE

  • QASE_RUN_ID

  • QASE_REPORT

  • QASE_RUN_COMPLETE

  • QASE_API_BASE_URL

  1. Go to the Apps page on Qase, then activate and generate a new token for reporter app. You can also use regular (user-issued) API tokens.

  2. Save created token as credentials in Jenkins: https://www.jenkins.io/doc/book/using/using-credentials/#adding-new-global-credentials

  3. Configure your job to pass saved token in QASE_API_TOKEN environment variable:

  1. You can also use the pipeline plugin. Example is below:

pipeline {
    agent {
        kubernetes {
            yaml '''
spec:
  containers:
    - name: node
      image: node:16.14.2-alpine3.15
      command:
        - sleep
      args:
        - 99d
'''
        }
    }
    
    parameters {
        string(name: 'QASE_PROJECT_CODE')
        string(name: 'QASE_RUN_ID')
        string(name: 'QASE_REPORT')
        string(name: 'QASE_RUN_COMPLETE')
        string(name: 'QASE_API_BASE_URL')
        credentials(name: 'QASE_API_TOKEN', credentialType: "Secret text")
    }
    
    environment {
        QASE_TESTOPS_API_TOKEN = credentials("${params.QASE_API_TOKEN}")
    }
    
    stages {
        stage('Setup Environment Variables') {
            steps {
                script {
                    // Map existing variables to new ones
                    env.QASE_TESTOPS_PROJECT = params.QASE_PROJECT_CODE
                    env.QASE_TESTOPS_RUN_ID = params.QASE_RUN_ID
                    env.QASE_TESTOPS_RUN_COMPLETE = params.QASE_RUN_COMPLETE
                }
            }
        }
        
        stage('Run tests') {
            steps {
                git url: 'https://github.com/foo/bar.git', branch: 'main'
                container('node') {
                    sh 'npm i'
                    sh 'npx jest'
                }
            }
        }
    }
}