DOP-C02 exam dumps

DOP-C02 practice question 23 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 23

Select 2

You are managing a CI/CD pipeline for a web application hosted on Amazon ECS. As part of the pipeline, you want to ensure automated tests are executed after the build phase and before deployment to production. The tests include unit tests, integration tests, and load tests. Which approach would best integrate automated testing into your CI/CD pipeline using AWS services?

  1. A

    Use AWS CodeBuild to execute the unit tests and integration tests, and configure a separate AWS CodePipeline stage for load testing using a custom Lambda function.

  2. B

    Integrate unit and integration tests as a step in AWS CodePipeline using AWS CodeBuild, and use AWS CodeDeploy deployment hooks for load testing.

  3. C

    Run all tests (unit, integration, and load tests) in a single AWS CodeBuild project configured as a stage in AWS CodePipeline.

  4. D

    Use AWS CodePipeline to orchestrate separate stages for unit tests, integration tests, and load tests, each invoking an AWS CodeBuild project for the respective test type.

  5. E

    Execute all tests in parallel by using a combination of AWS Step Functions and AWS CodeBuild, and trigger the deployment phase upon success.

Show answer and explanation

Correct answers: A, D

Explanation

The best approach to integrate automated testing into a CI/CD pipeline is to use AWS CodePipeline to orchestrate the execution of tests in separate, modular stages. Using AWS CodeBuild for unit and integration tests and creating a separate stage for load testing ensures better traceability and modularity. This approach also aligns with best practices for CI/CD pipelines on AWS, where each phase of the pipeline is decoupled and independently managed.

  • A. Correct.

    Correct: AWS CodeBuild is a suitable service for executing unit and integration tests, and a separate stage in CodePipeline for load testing allows for better modularity and control in the pipeline.

  • B. Incorrect.

    Partially correct, but not ideal: Using AWS CodeDeploy deployment hooks for load testing is an unconventional choice since deployment hooks are typically used for pre- or post-deployment checks rather than extensive testing.

  • C. Incorrect.

    Incorrect: Running all tests in a single CodeBuild project can result in less flexibility, longer execution times, and reduced modularity in the pipeline.

  • D. Correct.

    Correct: Orchestrating separate stages in AWS CodePipeline for different test types using CodeBuild ensures modularity, better traceability, and easier debugging.

  • E. Incorrect.

    Incorrect: While Step Functions can orchestrate workflows, it's unnecessary for a standard CI/CD pipeline when CodePipeline can handle the orchestration natively.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam