DOP-C02 exam dumps

DOP-C02 practice question 24 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 24

Select 2

Your company is using a CI/CD pipeline in AWS CodePipeline to deploy a serverless application built with AWS Lambda. The development team has requested the integration of automated testing to ensure the application functions correctly before deployment to production. Which of the following steps should you take to integrate automated testing into the pipeline?

  1. A

    Add a test stage in the CodePipeline that runs unit tests using AWS CodeBuild.

  2. B

    Use AWS Lambda to trigger the execution of functional tests during the deployment stage.

  3. C

    Configure an AWS CodeDeploy deployment configuration to include pre-traffic and post-traffic Lambda function hooks for integration tests.

  4. D

    Integrate Amazon EventBridge to automatically retry failed tests in the pipeline.

  5. E

    Add a manual approval step between the test stage and the deploy stage for test result validation.

Show answer and explanation

Correct answers: A, C

Explanation

To integrate automated testing into a CI/CD pipeline, a test stage should be added to run unit tests, and integration tests can be configured using AWS CodeDeploy deployment hooks. These approaches ensure that testing is automated, repeatable, and integrated into the workflow, providing high confidence in the application's quality before deployment.

  • A. Correct.

    Adding a test stage in CodePipeline that uses AWS CodeBuild for unit tests is a standard practice for integrating automated testing into a CI/CD pipeline.

  • B. Incorrect.

    Using AWS Lambda to trigger functional tests during the deployment stage is not an ideal practice, as automated tests should be decoupled from the deployment process to ensure proper isolation of testing and deployment concerns.

  • C. Correct.

    Configuring an AWS CodeDeploy deployment configuration with pre-traffic and post-traffic hooks allows for integration tests to be run before and after traffic is routed to the new version, ensuring the application is tested in a deployed state.

  • D. Incorrect.

    Integrating Amazon EventBridge to retry failed tests is not a valid approach for managing automated tests within a CodePipeline setup. CodePipeline handles test execution and failure logic.

  • E. Incorrect.

    Adding a manual approval step is not considered part of automated testing. While it may provide validation, it introduces manual intervention and does not align with the goal of automation.

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