Databricks-DE-Assoc Implementing CI/CD Practice Question
A team is using Databricks Asset Bundles (DABs) to manage their CI/CD pipeline. They want to run unit tests on their Python code before deploying the bundle. Where should the tests be executed in the pipeline?
⚠ Common exam trap
The trap here is thinking that tests must run inside Databricks, when in fact unit tests are best run in the CI environment before any deployment occurs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In the CI/CD runner (e.g., GitHub Actions) as a separate job step before the bundle deploy command.
Unit tests should be executed in the CI/CD runner as a step before deployment. This ensures that only code that passes tests is deployed. It also leverages the runner's environment and standard testing tools, keeping the pipeline efficient and reliable. Deploying first would risk introducing bugs into production.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Using the Databricks CLI to run a test command that executes tests on a cluster.
Why it's wrong here
The Databricks CLI does not have a built-in 'test' command for running unit tests. While you can run notebooks or jobs that execute tests, that is not a standard CLI feature. Unit tests are typically run outside Databricks in the CI runner to avoid cluster startup overhead and to keep the pipeline fast.
- ✗
Inside a Databricks notebook that is executed manually by a developer before merging.
Why it's wrong here
Manual execution is not automated and can be forgotten or skipped. CI/CD pipelines should automate testing to ensure consistency. Relying on manual notebook runs introduces human error and does not provide a reliable gate for deployment.
- ✓
In the CI/CD runner (e.g., GitHub Actions) as a separate job step before the bundle deploy command.
Why this is correct
Running unit tests in the CI/CD runner before deployment ensures that code is validated in isolation, without affecting the Databricks workspace. This is a standard CI practice: test first, then deploy only if tests pass. It also allows the use of standard Python testing frameworks like pytest.
- ✗
As a Databricks job within the bundle that is triggered after deployment.
Why it's wrong here
Running tests after deployment means faulty code could already be in production. While post-deployment tests are useful for integration testing, unit tests should run before deployment to catch issues early. Deploying first defeats the purpose of a quality gate.
About these practice questions
One of 276 original Databricks-DE-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Assoc exam.