DevOps refers to streamlining your software delivery process and automating it. A successful DevOps strategy begins with an agile best practice, Continuous Improvement (CI), which allows developers to check their code in a shared repository multiple times per day. An automated build then verifies each check-in, which allows teams to spot errors and conflicts quickly. To speed up the release of applications, automation frameworks and CI tools like Bamboo and Jenkins can be used.
What is DevOps?
DevOps aims to create better, faster, and more responsive software. This is done by bringing together Operations and Development teams. DevOps does not refer to a set of tools or a methodology. It is a cultural shift that removes the barriers between Devs and Ops to allow for faster and more frequent software delivery. This will enable your company to be more responsive to changing business needs. To deliver high-quality apps, the DevOps culture shift relies on constantly optimizing workflow, architecture, and infrastructure.
The Right DevOps Testing Strategy
Most DevOps projects aim to automate as many manual tasks as possible in their software delivery process. Slow deployment can be caused by errors in manual processes, such as handoffs between development and QA groups. These processes are subject to bureaucratic approval or signatures. This can lead to a lack of shared ownership of the final product. This is contrary to the agile testing development methodology which states that all members of an agile cross-functional team are equally responsible. This is why agile DevOps projects are tested by all members of the team, from developers to testers to operations personnel. Testing is conducted continuously in the DevOps approach. It happens early, often, and even after applications have been put into production.
Continuous Delivery vs. Continuous Deployment vs. Continuous Integration
The pros and cons of Continuous Testing in DevOps
Continuous testing is a crucial part of your DevOps strategy. Continuous Testing is also known as shift left testing. It is a method of testing software and systems that are used earlier in the software development cycle to increase quality and reduce the risk of defects getting into production code.
Continuous Testing is just one of many continuous activities that should be performed simultaneously in a DevOps pipeline.
- Continuous Development;
- Continuous Integration (CI);
- Continuous Delivery
- Continuous Monitoring
Continuous Development, or build automation, is the first step in implementing Continuous Delivery DevOps. Your developers will write unit tests for every piece of code that they write if they are practicing Test-Driven Development (TDD). TDD is an important part of agile development. It helps developers to think about the desired behavior for each piece of software they are building. This includes inputs, outputs, and error conditions. Before the software build begins, developers add new features to their code base. This compiles the source code into binary.
Continuous Integration is when members of a software team use a version management system to integrate their work, often to the same location such as master branches. Every change is built and checked by tests and other verifications to ensure that any integration errors are detected as soon as possible. Build automation automates software building using tools like Makefiles and Ant. This is in contrast to when a developer invokes the compiler manually.
The last stage in a Continuous Delivery pipeline is where an application passes all required tests and is then released into production. This means that every build is released to users. Continuous Delivery has many benefits. It allows users to receive new functionality within minutes. Users also get instant feedback from the DevOps team, which allows them to respond quickly to customer demands. The downside to Continuous Delivery is the risk of buggy software being released into production quicker, which can cause end-users to be dissatisfied and lead your company to lose customers. Many DevOps teams test in production to mitigate the risk of continuous deployment. This is also known as shift-right testing. It allows users to provide feedback and be incorporated into subsequent builds. Continuous Monitoring tools are often used to aid in this last phase (more details below).
As a DevOps group, multiple teams can work together. This means that DevOps impacts not only QA but also developers and business analysts. Testing is essential in encouraging collaboration and cohesiveness between all teams. It also automates everything. Iterations allow for continuous improvement of the test process.
Developing Your DevOps Testing Strategy
A successful DevOps strategy focuses on building, testing, and releasing software more often. It’s a good idea to automate your software delivery process if you are lucky enough to work in a “greenfield” company without a coding culture. Your business will be more competitive if you are able to create a Continuous Delivery DevOps Pipeline. You’ll be more able to deliver high-quality software to your customers and users faster than your competitors. Also, you’ll be more responsive to changes and business demands.
When adding a DevOps process to an existing company, the place you start will depend on your current testing and development practices as well as any bottlenecks in your software delivery. These bottlenecks could include slow, error-prone manual processes, as well as poor-quality big-bang rollouts in production that lead to unhappy users.
There are many ways to assess the state of your deployment process. You can use workflow visualization tools such as flowcharts or business process maps to help you understand and break down your current delivery processes. A Kanban board is one of the most effective visual tools for process management to assist in making these types of decisions.
Kanban boards (like the one pictured above) are simply sticky notes on a whiteboard. They are used to communicate project status and progress as well as other issues.
Kanban is a great tool to encourage your DevOps teams to improve their workflow. Kanban helps to highlight bottlenecks in your pipeline that slow down work or impact performance indicators your entire DevOps group has agreed upon. These include application time-to-market, system uptime, code quality, and customer satisfaction.
Kanban allows your Dev and Ops team to collaborate in a way they are not used to. When they begin to discuss how to reduce duplicate work and optimize your company’s release-management processes, you will likely see a gradual evolution into one team and one workflow that encompasses all Dev and Ops activities. This is a step towards a DevOps culture.
If they have been using Scrum or other Agile methodologies, they will be familiar with Kanban. They’ll also likely know how to help Operations people understand the flow, which is basically what Kanban is.
Continuous Testing: Best Practices
Automate as many tests as you can
Continuous Testing is about testing often and early. This is a significant challenge for your DevOps group if your applications are continuously being updated via Continuous Integrity, which allows the code to be integrated into a shared repository. To reduce the risk associated with Continuous Integration and get fast feedback on application quality, test automation is a good practice. Combining automation and CI allows teams to quickly test each new iteration of code. This reduces the chance of team members adding errors. The Test Automation Pyramid is a guide for planning your DevOps testing strategy. The base, or largest section of this pyramid, is composed of Unit Tests. This will happen if your developers are integrating code into shared repositories several times per day. It involves running component and unit tests that touch files or databases, as well as a variety of acceptance and integration checks on each check-in.
Apply pair testing to tests you don’t automate
Pair testing is another great practice that allows for knowledge transfer. It’s one of the best ways to train new members, maintain DevOps pipeline velocity, and help with training. This works best if your team has senior developers or testers who are open to sharing their knowledge and time with new members. Pair programming is similar to pairing testing, where two programmers work at the same workstation. Pair testing is where two people work at the same keyboard to test the software. One person tests the software, and the other reviews or analyzes the results. This can be done with a tester, a business analyst, or a tester. Each participant takes turns driving the keyboard. Pair testing can be used to break down communication barriers between developers and QA testers, as well as between application/platform operators. It also creates interdependency among people working in functional silos and strengthens workplace alliances.
Who are the DevOps Testing Participants?
DevOps teams must use best practices in Agile testing continuous integration and test-driven design to speed up their test QA and reduce cycle times. The notion of sharing responsibility for achieving the highest quality is a fundamental part of DevOps processes. Agile DevOps Teams hold everyone equally responsible for the quality and success of the product. Testing is performed by all members of the team. This includes those who are not designated testers or quality assurance professionals. DevOps testers or those who use a specific testing tool can do more than just that. They can collaborate with business owners or customers to determine product requirements, and they can also work with the other members of their team to create high-quality code to meet these requirements.
DevOpsQA testers must have flexibility in their work skills to be able to move easily from one part of the DevOps software development pipeline to another. It helps to have a good understanding of the culture and people of the organization.
DevOps QA testers require a good understanding of certain tools and technologies. (See the DevOps Tool Section below to get more information)
- Source Control (using Git, Bitbucket, Svn, VSTS, etc)
- Continuous Integration (using Jenkins, Bamboo, VSTS )
- Automation of Infrastructure (using Puppets, Chefs, and Ansible).
- Automated deployment automation & orchestration (using Octopus Deploy, VSTS, and Jenkins)
- Container Concepts (LXD and Docker)
- Orchestration (Kubernetes, Mesos, Swarm)
- Cloud (using AWS, Azure, GoogleCloud, Openstack)
A second useful skill is the ability to write scripting code using languages such as JavaScript, Python, or Ruby to implement automation technology and tools at all levels, from development to testing to operations.
DevOps Tools
Software applications go through five stages in the DevOps process.
- Continuous Development
- Continuous Testing
- Continuous Integration
- Continuous Delivery
- Continuous Monitoring
DevOps promotes collaboration between operations, development, and QA. There is no single DevOps product that is the best. A variety of tools from different vendors are often used in the DevOps toolchain. Each stage of the DevOps toolchain will have its own set of tools. This is based on the skills of your testers and developers, as well as the type of applications that you are deploying.
Below is a list of the most popular DevOps tools, along with an explanation of their use in each stage.
Jira: Continuous Development
Jira Software is the de facto standard in agile DevOps software testing and development. It has powerful collaborative functionality that visually highlights problems as they move through the project workflow. This makes Jira easy to use for project planning, development tracking, and reporting on progress.
Continuous Testing with Zephyr Jira
Jira Software was designed to track issues, projects, and workflows on IT projects. However, many DevOps teams use it for test case management so that both development and testing teams can collaborate in one system. You can create, track, report on, and execute test issues just like any Jira issue in Zephyr for Jira. It has the same look and feels as Jira.
Continuous Integration with Jenkins
Jenkins runs automatic tests every time a developer uploads new code to the source repository. Bugs that are detected early in development are often smaller, simpler, and more easily fixed by CI. Jenkins was originally created as a tool to automate the build of Java applications. However, Jenkins has evolved to include a multitude of plug-ins that can be used with other software tools. Jenkins plug-ins allow you to automate virtually any type of software project, regardless of what language, version control system, or database is used.
Continuous Delivery/Deployment using Puppets or Chef
You can avoid “snowflake server” issues with automated configuration tools like Puppet and Chef. “Snowflake server” is a long-running production server that has been modified and reconfigured over time using operating system upgrades, kernel patches, and/or system updates in order to fix security holes. This creates a unique server, similar to a snowflake. Manual configuration is required above and beyond what can be done by automated deployment scripts.
Definition files are used to describe the configuration of elements on a server. This is the best practice in infrastructure as Code. It allows environments (machines and network devices, operating systems, middleware, etc.). Configuration and specification should be done in an automated format rather than using physical hardware configurations or interactive configuration tools.
Continuous Monitoring with Splunk and Elk
Spunk, Elk log monitoring tools allow you to analyze transactions in your IT applications. This allows you to monitor and control the performance, availability, security, and user experience of your applications. Splunk and ELK provide a way for users to search log files, index them and create visualizations like dashboards and alerts.
Splunk is a paid service that bills according to how many transactions you make. The ELK Stack is a set of three open-source products–Elasticsearch, Logstash, and Kibana–all developed and maintained by Elastic.
DevOps Testing Instruments
The following DevOps tools can be used by DevOps teams. They include improving code quality, speeding up the time to market of software in your DevOps pipeline, and providing continuous feedback that will improve collaboration between development, testing, and operations teams.
Unit tests are the first to be performed in a DevOps pipeline. They are written by developers as part of the Test-Driven Development (TDD). TDD is a practice that developers use to write unit tests for every piece of code that they create. TDD is an important part of agile development. It helps developers to think about the desired behavior for each piece of software they are building. This includes inputs and outputs as well as error conditions.
TDD tools include JUnit. This is one of several open-source unit testing frameworks, which are collectively called xUnit. JUnit is used by Java developers to create repeatable cases that improve programming speed and code quality. It includes features like fixtures, test suites, and JUnit classes, as well as test runners. TestNG, an enhanced version of JUnit, covers a wider variety of test categories, including unit, functional, and integration.
Many agile DevOps teams practice unit and component testing in addition to the above-described test-first approach. This allows for testing to be done in small increments, as the software components are assembled on top of each other.
Cucumber encourages collaboration between developers, business, and QA on DevOps projects and other software projects. BDD bridges communication gaps between IT and business by writing test cases using a natural language that domain experts and non-programmers can understand. BDD features are typically defined in a GIVEN WHAT and THEN (GWT), which is a semi-structured method of writing test cases.
DevOps Test Automation
It is crucial that you choose the right DevOps tool for your company. The right tool can facilitate team collaboration, reduce costs, speed up release cycles, and give real-time visibility into application status and quality in your DevOps pipeline.
Test automation is a process that runs a lot of tests to ensure an application does not break when new changes are made. This happens at the various Unit-, API, and GUI levels of the Test Automation Pyramid. These Continuous Integration tools, such as Jenkins, are not the only tools you can use to build, test, and deploy applications when requirements change. This will increase your pipeline app’s release velocity.
Bamboo
Bamboo, a CI/CD Server from Atlassian. Bamboo, like Jenkins and other CI/CD servers, allows developers to build, integrate and test source code and then deploy it. Bamboo can be connected to other Atlassian tools like Jira, which allows for project management, and HipChat, which allows for team communication. Bamboo, unlike Jenkins, is commercial software that can be integrated with (and supported by) other Atlassian products like Bitbucket and Jira.
Selenium
Selenium consists of a variety of open-source software tools that can be used to automate software testing of web apps across different browsers/platforms. Selenium, like Jenkins, is used most often to build robust browser-based regression automation tests and suites. It also has a rich repository of open-source tools that can be used for various automation problems. Selenium supports programming languages such as C#, JavaScript, and Python. It can also be used to create automation scripts that will run on most modern web browsers.
TestComplete
TestComplete offers a comprehensive and powerful set of features to test web, mobile, and desktop applications. TestComplete has an easy-to-use record and playback feature. It also allows testers to use JavaScript or VBScript, Python, or C++Script to create test scripts. It also has an object recognition engine that can detect dynamic user interface elements. This makes it particularly useful for applications with dynamic and often changing user interfaces. SmartBear’s TestComplete product allows for easy integration with other SmartBear products.
SoapUI
SoapUI can be used as a tool to automate functional, web services, security, load, and another testing. SoapUI is specifically designed for API testing and supports both SOAP and REST services. SoapUI allows you to create complex test scenarios by using drag-and-drop.
Develop a DevOps Testing Strategy That Works
QA testing is essential to any DevOps process. Speed and quality are key components of DevOps. Zephyr meets this crucial need by providing the right set of QA tools that enable it to perform functional and integration testing. This is essential for validating DevOps quality, feature, and infrastructure changes and ensuring that every code check-in is production-ready.
The right DevOps tool allows agile teams to collaborate in the areas mentioned above–automated builds, automated testing, and automated provisioning infrastructure for deployment–to speed up the release of high-quality software. It should be compatible with your DevOps tools, such as issue tracking, project management, and automation tools.
Zephyr Standalone and Zephyr are both advanced test management tools. They offer end-to-end traceability for manual and automated tests. This traceability allows you to see the entire development and QA process and to better manage your testers. Zephyr makes it easier for DevOps teams, as both tools can be integrated with the best-of-breed agile and DevOps tools, such as Atlassian’s Jira and Confluence, Crowd, Crowd, and LDAP, and Continuous Integration tools such Jenkins, Bamboo, and Automation tools like Selenium and QTP/UFT.
Zephyr’s latest release makes it easier for central test case management. Projects and Releases can share and copy Test Cases from a Global Test Case Repository.
The Project Level allows you to create, modify and delete test cases. You can also share and copy test cases between releases in the same project and across projects. Zephyr also offers a release-specific requirements view that allows users to modify requirements without affecting other releases. This is particularly useful for companies that use Jira to manage their agile projects and requirements. Zephyr’s multiJira capability allows organizations to configure Jira instances at global and individual project levels based on their needs. Zephyr allows users to sync Jira requirements with specific releases. It is easier to report on quality initiatives across multiple DevOps projects, as you can track test case usage across different projects.
Last but not least, both tools provide live reporting, which you will need to have real-time visibility of the products in your DevOps process. This is essential so that bugs, inefficiencies, and other issues can be shared quickly and taken care of immediately.