Which tests usually run in which environment?
- Exam domain
- MLOps44% of the exam
- Difficulty
- Medium
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Identify types of testing performed (unit and integration) in various environment stages (dev, test, prod, etc.).
Testing types by environment stage are named.
Why C is the answer
Unit tests in dev and CI; integration tests in staging
Unit tests are fast and run early. Integration tests exercise the pipeline together in staging. Production validates each new model before deployment.
Remember: Right test, right stage.
How it works
Test scope grows as code moves toward prod.
In detail
- Unit early.
- Integration in staging.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. No tests until a problem is reportedWrong
Waiting for failures is not testing.
B. Integration tests in dev only, and unit tests in prod after deploymentWrongMost tempting
That reverses the order.
Why it tempts: It swaps the stages.
C. Unit tests in dev and CI; integration tests in stagingRight
Right test, right stage.
D. All tests in prod, where the real data isWrong
Testing in prod is too late.
Use case
An illustrative scenario, not a real incident.
Illustrative: a pull request runs unit tests; a staging job runs the full pipeline on sample data.
See it in different ways
flowchart LR S0["Dev build and unit test"] --> S1["Staging integration test"] --> S2["Prod train, validate, deploy"] --> S3["Monitor"]
How to read this chart
- Read it in order: Dev build and unit test, then Staging integration test, then Prod train, validate, deploy, then Monitor.
flowchart TD
Q{"Stage?"}
Q -->|"Dev and CI"| A0["Unit tests"]
Q -->|"Staging"| A1["Integration tests"]
Q -->|"Prod"| A2["Model validation"]How to read this chart
- At "Stage?": if "Dev and CI", go to "Unit tests"; if "Staging", go to "Integration tests"; if "Prod", go to "Model validation".