You are on page 1of 13

DEVOPS AND

CONTINUOUS TESTING
Balike Mahesh
7207030340
Continuous Testing in DevOps
• The basic goal for testing any software is to isolate errors or bugs that will impact the quality or
will compromise the security framework.
• Continuous testing in DevOps is an uninterrupted process of testing throughout the SDLC
where test cases are included in every stage in the CI/CD pipeline. Right from code commit, to
build, to provisioning, to deployment, and everything that happens in between—all the steps are
tested automatically. In case there are any bugs encountered in the process, instant feedback is
provided to developers ensuring rapid fixes of failure before the final release.
Why we need continuous testing in DevOps
Continuous testing is beneficial in more than one way. Following are some of the benefits of CI/CD
testing:
• Shortening and amplifying the feedback loop – If the automated Unit, functional & regression
test cases are integrated into the build pipeline, feedback is available almost instantly for each
step. Feedback from the test tasks provides immediate and useful insight to the whole team on
the stability, quality, and consistency of the product.

• Quality never takes a back seat and the software is tested continuously on the run, from the
start, and until the end

• Maximum test coverage as CI/CD Pipeline Automation Testing as a practice is incorporated right
from the earliest stages of development.

• Boosts the morale of the team and also provides confidence before delivery and deployment to
stakeholders regarding the quality of the overall product
Five easy steps to integrating Continuous Testing to your CI/CD pipeline
• In order to incorporate Continuous Testing into a CI/CD pipeline, utilize the steps outlined below:
• Step 1: Choose the test that best fits the use-case
• Multiple types of tests should be integrated into the pipeline as it is important to have coverage on all the software aspects.
Some of these tests are listed below:
• Types of testing
• Unit Testing
• These are short tests written from a developer’s perspective to verify the performance of single classes and functions i.e. the
smallest individual unit of the code.
• Integration testing
• These tests are written to check if multiple classes and functions are working together as expected.
• Functional Testing
• These tests are written from the user’s perspective to ensure that all software functionalities are behaving as the user
expects them to.
• End-to-End Testing
• Also known as workflow tests, these tests check the entire functionality of the application from backend to frontend. Given
the large area they cover, naturally these tests tend to be fairly large in volume.
• Bear in mind that the list above is not comprehensive. It touches on key testing types that are mandatory to most CI/CD
pipelines. Other frequently used tests comprise API Testing, Performance / Load Testing, Stress testing, regression testing,
security testing, UI testing, etc. The types of tests included in the Continuous Testing phase depend fundamentally on the
needs of the application under test.
• Step 2: Reduce CI/CD testing time by making your tests independent

For tests to run smoothly in a Continuous Integration (CI) environment, it is
important to run them independently. Let’s say that you are building an
application to help find restaurants in the city. Some of the important workflows
for this application would be - users should be able to search the restaurants,
login into their accounts, and explore different restaurants based on selected
criteria.
• So while creating the test workflow, focus on creating independent test cases to
verify each of the features. This will help reduce testing time and help identify
failures at a feature level.
• Step 3: Cut down on execution time with parallel tests
• In serial CI/CD testing, tests are run in a sequence one after the other. However, in
parallel testing, multiple tests run simultaneously, thus reducing overall execution
time.
• Keep in mind, however, that for a parallel test execution suite to run smoothly,
factors like the number of processors and the capability of the processors play a
very important role.
• Step 4: Use the Quadrant model to decide the type of CI/CD testing
• Identifying the types of tests to be included and automated in a CI/CD pipeline
can be difficult. However, Agile Testing Quadrants are helpful for the teams to
identify and plan the tests to be included, and the resources required for
implementation.

• There are four quadrants as depicted in the picture below. The bottom of this
matrix is tech-focused, while the top is business-facing. The left-hand side
focuses on tests that guide product development whereas the right-hand side
critiques the product.
• Quadrant 1 (Lower left corner) - All the technology-facing tests that guide the programming
team are part of this quadrant like unit testing, integration testing, and component testing. These
tests are automated and provide regular feedback to the developers on the code quality and if the
software is behaving as expected. The test cases for CI/CD Pipeline Automation Testing are
written alongside development to confirm that the functionality being built is moving in the right
direction.
• Quadrant 2 (Upper left corner) - Partially automated and partially manual, this quadrant is
business focused and the tests are performed to validate product specifications, simulate or build
a prototype. Automated functional testing which is done to ensure the product is aligned with the
business specification is part of this bracket.
• Quadrant 3 (Upper right corner) - This quadrant is focused on business-facing tests that critique
the product. It primarily includes manual testing like exploratory testing, A/B Testing, User
Acceptance Testing (UAT), and usability testing. These tests are more user-oriented and are
helpful to assess aspects like ease of use, flaws in application workflow, etc.
• Quadrant 4 (Lower right corner) - This quadrant is for technology-facing tests like performance
testing, load testing, and security testing of the application. The tests in this quadrant should be
prioritized based on the application-specific need.
Step 5: Testing Pyramid to give structure to
test automation strategy
• Created by Mike Cohn, the testing pyramid is a test automation framework that
ranks the order and sequence of testing types as well as the ideal composition of
each of them for better coverage.
• The above pyramid calls for automation testing at three different levels. Unit
testing is the foundation of automation test strategy followed by service-level
testing and user interface testing. Service here refers to testing the application’s
response based on the set of inputs.
• Much like the Quadrant model, the pyramid should be considered a guide and not
a structure set in stone. Use it to start planning your test sequences, but make
sure to include tests and organize them in accordance with your specific
requirements.
DevOps is a software development methodology that emphasizes
collaboration, communication, and automation between development
and operations teams to deliver software more efficiently and reliably.
Continuous testing is a key part of the DevOps process, as it involves
testing software continuously throughout the
development process to ensure quality and reduce the risk of defects.
Continuous testing in DevOps involves automating the testing process
and integrating it with the development pipeline, so that tests are run
automatically as soon as code changes are made.
This allows developers to catch and fix issues quickly, before they
become bigger problems.
To implement continuous testing in DevOps, organizations can use a variety of tools
and techniques, including:
1.Test automation frameworks: These tools enable automated testing of software,
such as unit tests, functional tests,
and integration tests.
2.Continuous integration/continuous delivery (CI/CD) tools: These tools automate the
process of building, testing,
and deploying software, so that changes can be pushed out quickly and reliably.
3.Test-driven development (TDD): This approach involves writing tests before writing
code, which helps ensure that code
is written to meet specific requirements.
4.Behavior-driven development (BDD): This approach involves writing tests in a
business-readable language, which helps
ensure that software meets the needs of stakeholders.
By implementing continuous testing in DevOps, organizations can achieve faster
time-to-market, higher quality software,
and more efficient development processes.

You might also like