AutomationCI/CD Platforms
Jenkins
Set up TestKase test reporting in your Jenkins pipelines.
Jenkins
Jenkins
Setup Steps
- Go to Manage Jenkins → Manage Credentials. Add "Secret text" credentials for
testkase-pat. - Add the reporting stage to your
Jenkinsfile. - Update the CLI flags to match your project.
- Run your pipeline.
Pipeline Template
pipeline {
agent any
environment {
TESTKASE_PAT = credentials('testkase-pat')
}
stages {
stage('Install') {
steps { sh 'npm ci' }
}
stage('Test') {
steps { sh 'npm test -- --reporter=junit --outputFile=test-results/junit.xml' }
}
}
post {
always {
sh """
npx @testkase/reporter report \\
--token $TESTKASE_PAT \\
--project-id PRJ-1 \\
--org-id 1173 \\
--cycle-id TCYCLE-5 \\
--format junit \\
--results-file test-results/junit.xml \\
--build-id "${env.BUILD_NUMBER}"
"""
}
}
}--cycle-id is optional. If not provided, results are reported to TCYCLE-1 — the master test cycle for the project.