Bamboo CI/CD Integration

PractiTest can integrate with Bamboo to report automated execution results directly into your test management workflow.

By connecting Bamboo pipelines with PractiTest through the API, teams can build a unified view of automated and manual testing activity in one place, improving traceability, reporting, and release visibility across the QA process.

Using the integration, teams can report automated execution results from Bamboo into PractiTest and report automation results directly into PractiTest Test Sets and Runs.

Prerequisites

  • A PractiTest project ID
  • A PractiTest Test Set ID for automation results
  • A PractiTest API token with the required permissions
  • A Bamboo plan that runs automated tests

How the Integration Works

There are two common integration approaches between Bamboo and PractiTest.

Option 1: Post-Pipeline Reporting

In this approach, Bamboo executes the automated tests and generates result files such as JUnit XML reports, logs, or screenshots.
At the end of the pipeline, a reporting script sends the results to PractiTest through the API.

Flow:

Bamboo pipeline runs automated tests

Test framework generates results, logs, screenshots, or reports

A Bamboo final task runs a reporting script

The script sends results to the PractiTest API

PractiTest updates tests, instances, runs, steps, files, and custom fields

Option 2: Real-Time Reporting

In this approach, the automation framework reports directly to PractiTest during execution, after each test or specification completes.

Flow:

Bamboo pipeline runs automated tests

Test framework reports to PractiTest after each test/spec

PractiTest updates tests, instances, runs, steps, files, and custom fields

Using the PractiTest API

The PractiTest API allows Bamboo pipelines and reporting scripts to create and update testing entities directly from automation executions.

Using the API, teams can:

  • Create or update automated tests
  • Add tests to the relevant Test Sets
  • Report passed, failed, blocked, or skipped executions
  • Send step-level execution details
  • Attach logs, screenshots, or execution artifacts
  • Populate custom fields such as environment, build number, branch, version, or component
  • Connect Bamboo execution data to dashboards and reports in PractiTest

Auto Create Run Endpoint

PractiTest’s Auto Create Run endpoint simplifies automation reporting by automatically locating or creating the required entities during execution reporting.

Using this endpoint, PractiTest can:

  • Locate or create the relevant test
  • Locate or create the matching instance in the selected Test Set
  • Execute the run with the provided attributes, steps, and files

Example:

{
 "data": {
   "type": "instances",
   "attributes": {
     "set-id": 12345,
     "run-type": "AutomatedRun",
     "run-duration": "00:00:18",
     "automated-execution-output": "Bamboo build 248 completed. View build results in Bamboo."
   },
   "test-attributes": {
     "name": "Login with valid credentials",
     "test-type": "ApiTest",
     "description": "Automated test reported from Bamboo CI/CD"
   },
   "steps": {
     "data": [
       {
         "name": "Run automated login test",
         "expected-results": "The user should be logged in successfully.",
         "actual-results": "The automated test passed in Bamboo.",
         "status": "PASSED"
       }
     ]
   }
 }
}

Bamboo Reporting Script Example

The example below shows how a Bamboo task might invoke a custom reporting script. This script is not provided out of the box. You’ll need to write or adapt a script that parses your test results and calls the PractiTest API. For guidance on which data to send, see the Mapping Bamboo Data to PractiTest section below.

python3 scripts/report_to_practitest.py \
 --results "test-results/**/*.xml" \
 --project-id "$bamboo_PRACTITEST_PROJECT_ID" \
 --set-id "$bamboo_PRACTITEST_SET_ID" \
 --token "$bamboo_PRACTITEST_API_TOKEN" \
 --build-number "$bamboo_buildNumber" \
 --build-url "$bamboo_buildResultsUrl"

The script receives these arguments, parses the result files from the Bamboo build, and sends each test’s execution data to PractiTest via the API.

Teams can adapt the script to match:

  • Their automation framework
  • Naming conventions
  • Custom fields
  • Reporting requirements

Mapping Bamboo Data to PractiTest

Bamboo or Automation DataPractiTest Destination
Test nameTest name
Test statusRun status
Failure messageActual results or automated execution output
Test durationRun duration
Build numberCustom field or execution output
BranchCustom field
EnvironmentCustom field
Screenshots or logsRun files or step files
JUnit/XML result dataRun steps
Bamboo build URLExecution output or custom field

Best Practices

To keep the integration maintainable, start with a focused implementation and expand gradually.

  • Use dedicated PractiTest Test Sets for Bamboo automation executions
  • Use stable test names or IDs to avoid duplicate tests
  • Store the API token as a secured Bamboo variable
  • Include Bamboo build number and build URL in the execution output
  • Use custom fields for branch, version, component, environment, and pipeline name
  • Add retry logic and rate-limit handling for large test suites
  • Start with a small automation suite before scaling to the full pipeline
Share

See it on your workflow, with your tools.