Continuous Integration/Continuous Deployment (CI/CD) Pipeline Testing Best Practices | Cisco Exam 300-910-DEVOPS

Best Practices for Testing Modules in Source Code Developed using TDD

Question

Which type of testing should be integrated into a CI/CD pipeline to ensure the correct behavior of all of the modules in the source code that were developed using TDD?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

The correct answer is B. unit testing.

In a CI/CD (Continuous Integration/Continuous Delivery) pipeline, the goal is to automate the software delivery process to increase speed, efficiency, and reliability. One way to achieve this is by incorporating automated testing at various stages of the pipeline. Testing ensures that the software being developed meets the expected requirements and that any changes to the codebase do not introduce new defects.

TDD (Test-Driven Development) is a software development methodology that involves writing automated tests before writing the actual code. TDD is a best practice in DevOps because it promotes a culture of quality and helps ensure that software is thoroughly tested.

Unit testing is a type of testing that focuses on testing individual units or components of code. In the context of TDD, this means testing each module in the source code as it is being developed. The purpose of unit testing is to ensure that each component of the code behaves as expected in isolation.

By integrating unit testing into a CI/CD pipeline, developers can catch defects early in the development cycle, before they can cause larger problems downstream. Automated unit tests can be run as part of the pipeline after each code change, ensuring that the entire codebase remains functional and that any changes do not break existing functionality.

Soak testing, load testing, and volume testing are all types of performance testing that test the behavior of software under different levels of load or stress. While important, these types of testing are not specifically designed to test individual modules or components of code, making them less relevant in the context of TDD and CI/CD.