DOP-C02 Question 14
Select 3Your team is building a serverless application using AWS Lambda and API Gateway. As part of the Software Development Lifecycle (SDLC), you need to ensure that the application is thoroughly tested before deployment. Which of the following actions align with best practices during the 'Testing' phase of the SDLC for this scenario?
- A
Implement unit tests to validate individual Lambda function logic.
- B
Use AWS X-Ray to trace and debug requests across the application workflow.
- C
Deploy the application to production for end-user testing.
- D
Conduct load testing on the API Gateway endpoints using tools like AWS CloudWatch Synthetics.
- E
Skip integration testing since individual Lambda functions are already unit tested.
Show answer and explanation
Correct answers: A, B, D
Explanation
The 'Testing' phase of the SDLC is critical for ensuring the quality and reliability of the application. Best practices include implementing automated tests such as unit and integration tests, using tools like AWS X-Ray for debugging and tracing workflows, and performing load or performance testing to validate system behavior under realistic conditions. Deploying directly to production and skipping integration testing are practices that introduce risks and should be avoided.
- A. Correct.
Unit tests are a key part of the 'Testing' phase and ensure that individual components, such as Lambda functions, work as expected.
- B. Correct.
AWS X-Ray is a powerful tool for tracing and debugging application workflows, and it helps identify issues during the testing phase.
- C. Incorrect.
Deploying directly to production for testing is not a best practice in the 'Testing' phase of the SDLC. Testing should occur in staging or testing environments.
- D. Correct.
Load testing is an important part of understanding how the system performs under various conditions and is highly relevant during the 'Testing' phase.
- E. Incorrect.
Skipping integration testing is not recommended. Integration tests ensure that the individual components of the application work together as expected.