DOP-C02 SDLC Automation Practice Question
A DevOps engineer is designing a CI/CD pipeline for a microservices application using AWS CodePipeline. Each microservice has its own CodeCommit repository. The engineer wants to run unit tests in parallel for all services when any repository receives a push, then run integration tests only after all unit tests pass. Which pipeline structure should the engineer use?
⚠ Common exam trap
Candidates often confuse parallel actions within a stage with parallel stages, or assume that separate pipelines are needed for each microservice, overlooking CodePipeline's ability to run multiple actions concurrently in a single stage.
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
✓
Create a single pipeline with a parallel action for unit tests, then a serial stage for integration tests
AWS CodePipeline supports parallel actions within a stage, allowing unit tests for all microservices to run concurrently. After all unit tests succeed, the pipeline transitions to a serial stage for integration tests, ensuring the correct dependency order. This structure minimizes build time while enforcing the required sequential gate.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a single pipeline with a parallel action for unit tests, then a serial stage for integration tests
Why this is correct
This design uses CodePipeline stages to gate flow: a stage with parallel unit-test actions runs the per-microservice unit suites concurrently, cutting total test wall-clock time, and the stage only completes when every action succeeds. The subsequent integration-test stage is serial relative to unit tests, so integration testing starts only after all unit suites are green, preserving deterministic dependency ordering while still exploiting parallelism where safe.
- ✗
Create a single pipeline with a serial stage for unit tests, then integration tests
Why it's wrong here
A single pipeline with a serial stage for unit tests forces the unit suites to execute one after another instead of concurrently, so total pipeline duration becomes the sum of all unit-test runtimes rather than the slowest runtime. While this is functionally correct and simpler to visualize, it needlessly increases feedback time for a microservice system without any benefit in reliability.
- ✗
Create one pipeline per microservice, each triggering integration tests via SNS
Why it's wrong here
Running one pipeline per microservice and having each publish an SNS notification for integration testing decentralizes orchestration. The integration-test job may be triggered before all services' unit tests pass, or multiple SNS messages may launch duplicate concurrent integration runs, causing race conditions and unpredictable results; there's also no built-in mechanism to aggregate success/failure across pipelines. Integration tests across services need a single coordinated pipeline that knows the status of all components before proceeding.
- ✗
Use AWS CodeBuild batch builds with a fan-out/fan-in pattern
Why it's wrong here
CodeBuild batch builds are designed to run multiple builds of a project (e.g., different build configurations or versions) using a single buildspec, not to coordinate sequential or parallel pipeline stages. A fan-out/fan-in pattern with batch builds cannot express stage-level gates like 'run integration only after all unit tests succeed' with proper failure handling; also, batch builds are a build action, not a pipeline orchestrator, so external orchestration is still required. The natural fit for stage coordination is CodePipeline stages and actions, which provide explicit transition and gate semantics.
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services 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 DOP-C02 exam.