INTEGRATION • BITBUCKET PIPELINES

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.

Try it freeBook a demo
4.6/5 on Atlassian MarketplaceFree for up to 10 users
Test ExecutionsSHOP-131×
Classic Test / Test Executions / SHOP-131
Execution results - 1772431741282
Fix version 4.2 · Environment Staging · Test plan SHOP-120
Done
Overall Execution Status (Total tests: 128)94% Pass
Key or summaryAssigneeRun statusMore
KeySummaryRun statusAction
SHOP-218IsPrime_InputIs1_ReturnFalsePassRe-run
SHOP-219IsPrime_ValuesLessThan2_ReturnFalsePassRe-run
SHOP-226Checkout_CardPayment_Requires3dsFailRe-run
SHOP-227Checkout_SavedAddress_AutofillsPassRe-run
SHOP-231Cart_Coupon_ExpiredIsRejectedSkippedRe-run
SHOP-233Orders_Email_IsSentOncePassRe-run
SHOP-240Search_Filters_KeepStatePassRe-run
SHOP-245Account_Password_ResetLinkPassRe-run
Bitbucket pipeline #482Results imported to SHOP-131
Works withJUnitNUNUnitTeTestNGxUxUnitRobot FrameworkCucumberBeBehave
AUTOMATIC IMPORT

Pipeline results, straight into Jira

Each pipeline fills a Test Execution, and new tests show up in Jira ready to link to requirements.

Pick the executionSend results to a set Test Execution key, or start a new one.
No duplicatesMatching tests are reused on every run.
NUnit, JUnit and moreSeven report formats, with statuses mapped for you.
Screenshots attachedAttachments in the report land on the test run.
#482 · PipelineBranch main · commit 32fe523
Successful
Run test2m 51s
Upload report to AgileTest using cli7s
ArtifactsNunit/PrimeService.Tests/test-result.xml
SHOP-131updated just now
128results imported
+2new test cases
0duplicates
94%pass rate
New Bitbucket Configuration×
Nightly regression
shop-team
web-app
{
  "target": {
    "ref_type": "branch",
    "type": "pipeline_ref_target",
    "ref_name": "main"
  }
}
••••••••••••••••••••
Test plan key SHOP-120Test environment StagingFixVersion 4.2
CancelSave
TRIGGER FROM JIRA

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.

  1. 1
    Set 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.
  2. 2
    Click RunFrom the AgileTest panel on any Test Execution. Nothing else to fill in.
  3. 3
    Follow the runThe build status posts back to Recent runs.
TRACEABILITY

Know which requirements passed this build

Automated and manual results roll up to the same requirements in Jira.

Linked to requirementsLink each automated test case to the requirement it checks.
Latest statusOK or NOK on each requirement after every build.
Defects from failuresLog a bug from a failed run, linked back to it.
Reports in JiraTest Coverage and Traceability reports.
Projects/Shop/SHOP-87In progress
SHOP-87
Guest checkout
AgileTestLatest test status NOK
To Do 1Pass 2Fail 1
Test Cases 4Test ScriptsTest Sessions
KeySummaryTypeLatest status
SHOP-214Apply discount code as guestManualFailRe-run
SHOP-215Pay by cardManualPassRe-run
SHOP-218Checkout API returns order IDGenericPassAutomated
SHOP-217Order email is sentManualTo DoRun
Bitbucket pipeline #482JUnit results imported
120 passed3 failed5 skipped
bitbucket-pipelines.yml
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.xml
SETUP

A 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.

Same step or its owncurl calls after your tests, or the CLI image in an upload step.
Cloud and Data CenterClient ID and Secret, or a Jira personal access token.
Repository variablesCredentials stay in secured repository variables.
Build status in JiraAn after-script posts the result to the Test Execution.
HOW IT WORKS

Set up with the official guides

FAQ

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

ALSO WORKS WITH