---
title: "BluBees BDD Test Automation"
canonical: "https://doc.blubees.ai/space/blubeesdoc/222167043/BluBees+BDD+Test+Automation"
format: markdown
---
**What : Run** in TestRay, execute in Bitbucket, results back in TestRay, with no manual steps in between.

This lets a QA engineer run BDD automation from TestRay without leaving TestRay. When a Test Cycle runs, BluBees creates a Bitbucket branch, copies the feature file for each Test Case in the Test Suite, and starts the automation pipeline. It monitors the pipeline until completion, downloads the test results, and publishes them back to TestRay, providing a real-time update.

![image-20261026-105117.png](media://dcb5adaa-8a33-4004-a0c0-c78d24f5fe0b)

- **Step 1 — Test Triggering from TestRay**
  - A QA engineer selects a Test Cycle in TestRay and clicks RUN.
  - TestRay pushes the request, through a webhook trigger, into the BluBees flow.
  - The request carries the test suite IDs that belong to the cycle.
- **Step 2 — Creating a Branch in Bitbucket**
  - BluBees creates a new branch in the Bitbucket repository
  - This keeps the files for this run separate from everything else in the repository.
- **Step 3 — Splitting the Test Suites**
  - The list of test suite IDs goes to the array splitter
  - The splitter handles the suites one at a time, so a cycle with several suites is processed suite by suite.
- **Step 4 — Fetching and Copying the Feature Files**
  - For each suite, BluBees gets its BDD feature file from TestRay and copies it into the new Bitbucket branch.
  - When every suite has been handled, the splitter’s Done output moves the flow on.
- **Step 5 — Pipeline Execution**
  - BluBees starts the BDD automation pipeline in Bitbucket.
  - The pipeline runs the feature files that were just copied into the branch.
- **Step 6 — Waiting for the Pipeline to Finish**
  - BluBees monitors Bitbucket for the pipeline’s status and checks if the Pipeline Completed.
  - A decision step then branches.
  - If the pipeline is still running, the flow goes back and asks again.
  - If it has completed, the flow moves on.
- **Step 7 — Downloading the Test Artifact**
  - Once the pipeline has completed, BluBees downloads the test artifact it produced
  - This is the file with the results of the run, such as pass and fail status.
- **Step 8 — Publishing Results Back to TestRay**
  - BluBees reads the artifact and publishes the results to the test execution in TestRay.
  - The QA engineer sees the outcome in TestRay without opening Bitbucket.
- **Step 9 — Centralized Visibility & Analysis**
  - TestRay updates the test run in real time.
  - Stakeholders can view dashboards and reports that combine these automated results  for a complete picture of product health.

**Key Benefits**

- **Run Where You Plan:** QA teams start automation from TestRay and see the results there. They don’t switch to Bitbucket to launch a pipeline or watch it run.
- **QA Empowerment:** QA can launch a suite at any time without direct access to the repository or the pipeline setup, because BluBees handles the branch, the files, and the run.
- **No Manual Handoffs:** The flow copies the feature files, starts the pipeline, waits for it to finish, and carries the results back, so nobody copies files or results between tools.
- **Clean, Repeatable Runs:** Each run gets its own branch and its own feature files, so runs don’t interfere with each other, and a cycle with several test suites is handled one suite at a time.
- **One View of Product Health:** Automated results land in the same TestRay run, so stakeholders get a complete picture in one place.
- **Orchestration Inside Jira:** No external middleware; the automation runs where the team already works.

## Common Data Synced

| **Test Management Tool - TestRay** | **Git Repository / CI Pipeline** |
| --- | --- |
| Test Case | Gherkin Feature File |
| Test Scripts | Commit / Branch |
| Test Run Trigger | Pipeline Run |
| Test Result | Scenario Pass / Fail Report |

**Note:** This guide uses Bitbucket as an example. BluBees also works with other CI/CD tools, such as GitLab, and the same flow can be built with any of them by swapping in that tool’s connector.