Skip to main content

AWS DVA-C02 Drill: Amplify CI/CD Testing - Integrating End-to-End Tests in Build

Jeff Taakey
Author
Jeff Taakey
21+ Year Enterprise Architect | AWS SAA/SAP & Multi-Cloud Expert.

Jeff’s Note
#

Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.

For DVA-C02 candidates, the confusion often lies in where and how to implement automated testing within Amplify’s build and deploy pipeline. In production, this is about knowing exactly how to embed test phases into CI/CD workflows to catch bugs before deployment. Let’s drill down.

The Certification Drill (Simulated Question)
#

Scenario
#

NextGen Fitness Apps, a startup building an interactive workout tracker, uses AWS Amplify Hosting for their front-end React application. Recently, the development team noticed a rise in reported bugs from users after deployment. To improve code quality and reduce production bugs, the lead developer wants to incorporate end-to-end (E2E) testing as part of the application’s continuous delivery workflow.

The Requirement:
#

Implement automated end-to-end tests that run during the build and deploy process in AWS Amplify Hosting to catch bugs before code reaches production.

The Options
#

  • A) Run the amplify add test command in the Amplify CLI.
  • B) Create unit tests inside the application code and deploy them by running amplify push in the Amplify CLI.
  • C) Add a test phase to the amplify.yml build settings for the application.
  • D) Add a test phase to the aws-exports.js file for the application.

Google adsense
#

leave a comment:

Correct Answer
#

C) Add a test phase to the amplify.yml build settings for the application.

Quick Insight: The Developer Imperative
#

For DVA-C02, knowing how to integrate testing into the Amplify build lifecycle is key — setting up test commands in amplify.yml allows automated tests to run at build time, preventing buggy deployments.

Content Locked: The Expert Analysis
#

You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?


The Expert’s Analysis
#

Correct Answer
#

Option C

The Winning Logic
#

AWS Amplify uses a configuration file called amplify.yml to define build steps for the application pipeline. By adding a dedicated test phase in this YAML file, developers can specify commands that run their automated tests (unit, integration, or end-to-end) before the app is deployed. This ensures test failures block faulty releases, applying Continuous Integration best practices.

  • Running tests inside the Amplify build process integrates seamlessly with Amplify Hosting’s managed CI/CD.
  • The build steps support complex commands, including running E2E tests with frameworks like Cypress or Jest.
  • This method aligns with Amplify’s intended use of amplify.yml as the core pipeline configuration.

The Trap (Distractor Analysis)
#

  • Why not A?
    No such command as amplify add test exists in Amplify CLI. This is a fictitious option.

  • Why not B?
    While unit tests belong in application code, simply pushing code with amplify push does not run them automatically. Tests must be executed during builds, not just deployed.

  • Why not D?
    The aws-exports.js file is a configuration artifact generated by Amplify, unrelated to build or test execution phases. It does not control testing workflows.


The Technical Blueprint
#

# Example snippet to add in amplify.yml to run tests during the build phase

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
    test:
      commands:
        - npm run test:e2e  # your E2E test command here
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

This configuration tells Amplify Hosting to run the specified E2E tests during the build’s test phase, blocking deployment if tests fail.


The Comparative Analysis
#

Option API / CLI Complexity Performance Impact Use Case / Effectiveness
A Non-existent command N/A Invalid - No such command
B Simple CLI usage No automatic tests Deploys tests as code, but tests never run automatically in pipeline
C Medium - YAML config Medium - CI build slows but ensures quality Correct - integrates tests in CI/CD process
D None - config file None Misunderstood file - does not affect tests

Real-World Application (Practitioner Insight)
#

Exam Rule
#

For the exam, always look for the use of amplify.yml test phase when the question involves automated testing in Amplify.

Real World
#

In production, many teams build custom shell scripts or npm scripts invoked via amplify.yml test phases to run integration and E2E tests using frameworks like Cypress or Playwright, ensuring bugs are caught early.


(CTA) Stop Guessing, Start Mastering
#


Disclaimer

This is a study note based on simulated scenarios for the DVA-C02 exam.

The DevPro Network: Mission and Founder

A 21-Year Tech Leadership Journey

Jeff Taakey has driven complex systems for over two decades, serving in pivotal roles as an Architect, Technical Director, and startup Co-founder/CTO.

He holds both an MBA degree and a Computer Science Master's degree from an English-speaking university in Hong Kong. His expertise is further backed by multiple international certifications including TOGAF, PMP, ITIL, and AWS SAA.

His experience spans diverse sectors and includes leading large, multidisciplinary teams (up to 86 people). He has also served as a Development Team Lead while cooperating with global teams spanning North America, Europe, and Asia-Pacific. He has spearheaded the design of an industry cloud platform. This work was often conducted within global Fortune 500 environments like IBM, Citi and Panasonic.

Following a recent Master’s degree from an English-speaking university in Hong Kong, he launched this platform to share advanced, practical technical knowledge with the global developer community.


About This Site: AWS.CertDevPro.com


AWS.CertDevPro.com focuses exclusively on mastering the Amazon Web Services ecosystem. We transform raw practice questions into strategic Decision Matrices. Led by Jeff Taakey (MBA & 21-year veteran of IBM/Citi), we provide the exclusive SAA and SAP Master Packs designed to move your cloud expertise from certification-ready to project-ready.