[AWS] Integrate Automated Testing into CI/CD Pipelines

This post demonstrates how to integrate testing and security into CI/CD (Continuous integration (CI), continuous delivery (CD), and continuous deployment (CD)) pipelines using AWS DevOps Tools such as CodeCommit, CodeBuild, CodeDeploy, and CodePipeline.


Testing – Stages

TestsStageFeatures
Unit TestsDevelopment, Buildsmall in scope and test a very specific partfasterlow cost
Static Code AnalysisDevelopment, Buildautomatic verification of best practices
Service & Integration TestsBuild,
Staging
evaluate a component’s interaction with other components
Performance & compliance TestsStaging,
Production
evaluate the performance (responsiveness and stability) by load tests, stress tests, and spike tests

check if the application meets security requirements
UI & End-to-End TestsStaging,
Production
ensures that the application works correctly according to the user’s workflowslowerhigh cost
Testing Pyramid

Test coverage

  • The overall testing plan
  • Identify your application’s requirements and develop tests that validate the requirements

Code coverage

  • How much of your code is exercised in a set of tests

Automated Testing

  • Reliability & Consistency & Scalability
    • The same tests will run for each revision of your application.
  • Benefits
    • Improve Productivity
    • Catch bugs early
    • Deliver releases/updates quickly by removing manual process

Types of Testing

FeaturesWhat to Check
Functional TestingCheck if a piece of software is acting in accordance with requirements

No knowledge of the internal system logic
Test the functionality

Check the inputs and outputs

Test error messages under known error conditions
Regression TestingCheck if new changes do not disrupt already existing functions

Expensive in terms of time and money, especially when done manually
A large number of test sets
Performance TestingDetermines how your system performs in terms of responsiveness and stability under a specific workloadLoad testing
Stress testing
Endurance (soak) testing
Spike testing
Breakpoint testing
Configuration testing
User Acceptance Testing (UAT)The last phase of your software testing process

Ensure the system meets documented user requirements.
Real-life scenario
Alpha/Beta testing
Regulation acceptance testing
Synthetic TestingUnderstanding user’s experience in an application by predicting behaviorUser actions are simulated

Leave a Comment