Jenkins test management, in Jira
Your Jenkins builds already know what passed. Send every result to AgileTest, start jobs from Jira and see coverage per requirement.
| Key | Summary | Test type | Latest status | Executions |
|---|---|---|---|---|
| SHOP-201 | Guest can check out with a saved card | MANUAL | Pass | 3 |
| SHOP-218 | CheckoutTest.returnsOrderId | GENERIC | Pass | 12 |
| SHOP-226 | PaymentTest.card3dsChallenge | GENERIC | Fail | 12 |
| SHOP-204 | Coupon code applies to cart total | MANUAL | Pass | 2 |
| SHOP-231 | AddressTest.savedAddressAutofill | GENERIC | Pass | 12 |
| SHOP-207 | Order email shows delivery date | MANUAL | To Do | 0 |
| SHOP-240 | SearchTest.filtersKeepState | GENERIC | Skipped | 11 |
| SHOP-245 | AccountTest.passwordResetLink | GENERIC | Pass | 12 |
Build results, filed in Jira for you
No more digging through Jenkins logs. Every build’s results are waiting in Jira, next to the tests and requirements they belong to.
09:14No Changes2s3m 41s9s
21:02No Changes2s3m 52s8s
09:10No Changes3s3m 38s9s
| Test Execution | Source | Framework | Status | Created at |
|---|---|---|---|---|
| SHOP-131 | Import | JUnit | Success | 1 minute ago |
| SHOP-128 | Import | JUnit | Success | 12 hours ago |
| SHOP-125 | Import | JUnit | Success | Yesterday |
Start Jenkins jobs from a Test Execution
Run the regression job right before sign-off, without opening Jenkins.
- 1Set up onceAdd a Jenkins configuration with your Jenkins URL, username, job name and API token. Pipeline and MultiBranch jobs both work.
- 2Click RunFrom the AgileTest panel on any Test Execution. Nothing else to fill in.
- 3Follow the buildSuccess or failure posts back to Recent runs.
Every build, mapped to requirements
See which requirements the latest Jenkins build covered, next to your manual results.
| Key | Summary | Type | Latest status | |
|---|---|---|---|---|
| SHOP-214 | Apply discount code as guest | Manual | Fail | Re-run |
| SHOP-215 | Pay by card | Manual | Pass | Re-run |
| SHOP-218 | Checkout API returns order ID | Generic | Pass | Automated |
| SHOP-217 | Order email is sent | Manual | To Do | Run |
pipeline {
agent { docker { image 'maven:3.9.9-amazoncorretto-17-al2023' } }
environment { PROJECT_KEY = 'SHOP' }
stages {
stage('Run test') {
steps {
script {
sh 'mvn test'
// 1. Get a temporary token
token = sh(script: """curl "$BASE_AUTH_URL/api/apikeys/authenticate" -X POST \
-H 'Content-Type:application/json' \
--data '{"clientId":"'"${env.CLIENT_ID}"'","clientSecret":"'"${env.CLIENT_SECRET}"'"}'""",
returnStdout: true).trim()
// 2. Send the JUnit report
sh """curl "$BASE_URL/ds/test-executions/junit?projectKey=${PROJECT_KEY}" -X POST \
-H 'Content-Type:application/xml' -H "Authorization:JWT ${token}" \
--data "@target/surefire-reports/TEST-calculateTest.xml""""
}
}
}
}
}pipeline {
agent none
environment { PROJECT_KEY = 'SHOP' }
stages {
stage('Run test') {
agent { docker { image 'maven:3.9.9-amazoncorretto-17-al2023' } }
steps {
sh 'mvn test'
stash includes: '**/target/surefire-reports/*.xml', name: 'reports'
}
}
stage('Upload report') {
agent {
docker {
image 'ghcr.io/agiletestapp/agiletest-cli:latest'
args '--entrypoint=""'
}
}
steps {
sh '''agiletest --client-id ${CLIENT_ID} --client-secret ${CLIENT_SECRET} \
test-execution import \
--framework-type junit --project-key ${PROJECT_KEY} \
target/surefire-reports/TEST-calculateTest.xml'''
}
}
}
}pipeline {
stages { ... }
// Send the build result to the Test Execution
post {
success {
script { sendBuildStatus(getApiToken(), "success") }
}
failure {
script { sendBuildStatus(getApiToken(), "failed") }
}
}
}
def sendBuildStatus(token, status) {
sh(script: """
curl -s -H "Content-Type:application/json" -H "Authorization:JWT $token" \
--data '{ "buildURL": "'"$env.BUILD_URL"'", "tool":"jenkins", "result":"${status}" }' \
"$BASE_AUTH_URL/ds/test-executions/${TEST_EXECUTION_KEY}/pipeline/history?projectKey=${PROJECT_KEY}"
""", returnStdout: true).trim()
}One extra stage in your Jenkinsfile
Call the API from your test stage, or add a CLI stage that picks up the stashed report.
Set up with the official guides
Questions, answered
Does AgileTest run my automated tests?
No. Jenkins keeps building and running your tests. AgileTest imports the results into Jira, and can start a configured Jenkins job from a Test Execution.
Should I use the AgileTest CLI or the REST API?
Either works. The REST API uses two curl calls inside your test stage. The CLI runs in its own stage with the ghcr.io/agiletestapp/agiletest-cli image and uses the report you stash from the test stage.
Which report formats are supported?
JUnit, NUnit, TestNG, xUnit and Robot Framework (XML), plus Cucumber and Behave (JSON). Tools that export JUnit XML, such as Playwright, Cypress and pytest, work too.
Can I start a Jenkins job from Jira?
Yes. Add a Jenkins configuration in AgileTest (Jenkins URL, username, job name and a Jenkins API token), then click Run on a Test Execution.
Which Jenkins job types are supported?
Pipeline and MultiBranch jobs. For MultiBranch jobs you also choose the branch to build.
Does it work on Jira Data Center?
The Jenkins integration supports AgileTest for Jira Cloud. It uses an AgileTest Client ID and Client Secret.
Bring your Jenkins test results into Jira
Questions? Contact us · Visit the 24/7 Support Desk