Bitbucket test management, in Jira
Keep code, pipelines and tests in your Atlassian stack. Every Bitbucket pipeline reports to Jira, and QA can start runs from a Test Execution.
| Key | Summary | Run status | Action |
|---|---|---|---|
| SHOP-218 | IsPrime_InputIs1_ReturnFalse | Pass | Re-run |
| SHOP-219 | IsPrime_ValuesLessThan2_ReturnFalse | Pass | Re-run |
| SHOP-226 | Checkout_CardPayment_Requires3ds | Fail | Re-run |
| SHOP-227 | Checkout_SavedAddress_Autofills | Pass | Re-run |
| SHOP-231 | Cart_Coupon_ExpiredIsRejected | Skipped | Re-run |
| SHOP-233 | Orders_Email_IsSentOnce | Pass | Re-run |
| SHOP-240 | Search_Filters_KeepState | Pass | Re-run |
| SHOP-245 | Account_Password_ResetLink | Pass | Re-run |
Pipeline results, straight into Jira
Each pipeline fills a Test Execution, and new tests show up in Jira ready to link to requirements.
Nunit/PrimeService.Tests/test-result.xml{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "main"
}
}Start Bitbucket Pipelines from Jira
Kick off a regression run where you plan your testing, and see the result come back to the same Test Execution.
- 1Set up onceAdd a Bitbucket configuration with your workspace, repository slug and a repository access token. Optionally set the test plan, environment, fix version and milestone.
- 2Click RunFrom the AgileTest panel on any Test Execution. Nothing else to fill in.
- 3Follow the runThe build status posts back to Recent runs.
Know which requirements passed this build
Automated and manual results roll up to the same requirements in Jira.
| 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 |
image: mcr.microsoft.com/dotnet/sdk
pipelines:
branches:
main:
- step:
name: Test and upload report
script:
- dotnet test --logger:"nunit;LogFilePath=test-result.xml"
# 1. Get a temporary token
- export token=$(curl "$BASE_AUTH_URL/api/apikeys/authenticate"
-X POST -H 'Content-Type:application/json'
--data '{"clientId":"'"$CLIENT_ID"'","clientSecret":"'"$CLIENT_SECRET"'"}' | tr -d '"')
# 2. Send the NUnit report
- curl -X POST "$BASE_URL/ds/test-executions/nunit?projectKey=$PROJECT_KEY"
-H "Content-Type:application/xml" -H "Authorization:JWT $token"
--data-binary "@PrimeService.Tests/test-result.xml"image: mcr.microsoft.com/dotnet/sdk
pipelines:
branches:
main:
- step:
name: Run test
script:
- dotnet test --logger:"nunit;LogFilePath=test-result.xml"
artifacts:
- Nunit/PrimeService.Tests/*.xml
- step:
name: Upload report to AgileTest using cli
image: ghcr.io/agiletestapp/agiletest-cli:latest
script:
- |
agiletest \
--base-auth-url $BASE_AUTH_URL --base-url $BASE_URL \
--client-id $CLIENT_ID --client-secret $CLIENT_SECRET \
test-execution import --framework-type nunit \
--project-key $PROJECT_KEY Nunit/PrimeService.Tests/test-result.xml# Data Center: DC_TOKEN = Jira personal access token
- step:
name: Upload report to AgileTest using cli
image: ghcr.io/agiletestapp/agiletest-cli:latest
script:
- |
agiletest \
--base-url $BASE_URL \
--data-center-token $DC_TOKEN \
test-execution import --framework-type nunit \
--project-key $PROJECT_KEY Nunit/PrimeService.Tests/test-result.xmlA couple of lines in bitbucket-pipelines.yml
Upload with curl in your test step, or add a CLI step that picks up the report as an artifact.
Set up with the official guides
Questions, answered
Does AgileTest run my automated tests?
No. Bitbucket Pipelines keeps building and running your tests. AgileTest imports the results into Jira, and can start a configured pipeline from a Test Execution.
Should I use the AgileTest CLI or the REST API?
Either works. The REST API uses two curl calls in your test step: one for a token, one to send the report. The CLI runs as its own step with the ghcr.io/agiletestapp/agiletest-cli image and reads the report from the step artifacts.
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 Bitbucket pipeline from Jira?
Yes. Add a Bitbucket configuration in AgileTest (workspace, repository slug, optional body data such as the branch, and a repository access token with Pipelines write permission), then click Run on a Test Execution.
Can results go to an existing Test Execution?
Yes. Add the testExecutionKey parameter to the import call. Matching tests are reused and new ones are added.
Does it work on Jira Cloud and Data Center?
Yes. Cloud uses an AgileTest Client ID and Client Secret. Data Center uses a Jira personal access token.
Bring your Bitbucket test results into Jira
Questions? Contact us · Visit the 24/7 Support Desk