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
| Tests | Stage | Features | ||
|---|---|---|---|---|
| Unit Tests | Development, Build | small in scope and test a very specific part | faster | low cost |
| Static Code Analysis | Development, Build | automatic verification of best practices | ||
| Service & Integration Tests | Build, Staging | evaluate a component’s interaction with other components | ||
| Performance & compliance Tests | Staging, 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 Tests | Staging, Production | ensures that the application works correctly according to the user’s workflow | slower | high cost |
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
| Features | What to Check | |
|---|---|---|
| Functional Testing | Check 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 Testing | Check 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 Testing | Determines how your system performs in terms of responsiveness and stability under a specific workload | Load 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 Testing | Understanding user’s experience in an application by predicting behavior | User actions are simulated |
