An INFJ personality wielding brevity in speech and writing.
A brief guide to testing in DevOps
An INFJ personality wielding brevity in speech and writing.
What is Testing in DevOps?
DevOps – as the term notes, is the practice that encourages partnership between development and IT operation teams to suit the aspirations of continuous integration and continuous deployment (CI/CD) and modern software delivery. However, this union of two teams is only half-done; to be able to reap the full benefits of DevOps, testing also needs to be tagged along in the continuous delivery chain.
So, what do we mean by testing in DevOps? Fundamentally, testing in DevOps aims to strike a right balance within the overlap of goals, feedback cycles, skills among the development, QA and the operations team. It promotes the collaboration of all three teams while automating the process of software delivery and infrastructure changes.
This article walks you through:
How will Testing be done in DevOps?
Testing in DevOps means that testing will no longer be happening in siloes. This implies, testing will happen in tandem with development, fostering for a quicker feedback cycle so that each team can stay in the know about how their work impacts rest of the delivery cycle.
As a result, we see a great emphasis on product quality is created throughout the DevOps cycle.
Dan Ashby, co-founder, of Software Testing Clinic, illustrates testing in DevOps as follows,
Having integrated agile methodology into teams with agile manifesto, testing in DevOps team has formulated guiding principles for testing software thoroughly and at scale. These came to be known as the “DevTestOps” manifesto.
Continuous testing over testing at the end
Embracing all testing activities over automating everything
Testing what gives value, based on customer usage, over testing everything
A whole team approach to testing over testing in siloed testing departments
Product coverage over code coverage
Leveraging the above DevTestOps practices ensure teams that regular deployments take place without much interruptions by providing greater visibility into the state of software development and help them achieve the desired product quality.
We’ll see how we can integrate testing in DevOps, plan for a fine DevOps testing strategy, best practices, and tools in the sections below.
Do you know?
|
Automated testing – the driver of DevOps
DZone research findings on test automation revealed that,
|
Reasons why DevOps need automated testing:
- Nearly impossible to continuously test the code and code fixes at the rate at which it is deployed
- Trailing of QA teams in the continuous software delivery chain
- Inconsistent test practices & setting up of one-off QA teams weaken the quality of the software being built
- Longer and mundane feedback cycles forcing development and QA to push the code down to production to achieve speed
Incorporating automated testing is the sure-shot way of integrating QA into DevOps workflow fruitfully. Without optimal automated testing in place, our pursuit of streamlining processes across the CI/CD pipeline for effective DevOps will be a distant dream. In this sense, automated testing acts as a driver of DevOps.
Setting up test automation
As we discussed earlier, automated testing is a crucial factor behind this entire DevTestOps phenomenon. Running big volumes of nightly regression suites every night or on weekends manually simply undercuts the goal of DevOps.
Let’s dive into the setting up of test automation.
Test automation skills are hard to acquire as it’s technically complicated. DevOps will continue to be a distant goal for companies that are not there yet or in the initial stages of adopting test automation in their delivery chain.
For successful DevTestOps implementation, a test automation engineer needs to have a good understanding of the functionalities of the software, inherent technical details, choice of automation and CI/CD tools, scripting language, automation framework design, reporting needs, ability to set up continuous testing needs and competence to develop test scripts in parallel with development.
Imagining you’re figuring out test automation for your company, there are 4 action items you can consider:
- Have a champion internally or from the outside consulting firm, who understands the goals and has a plan to achieve them.
- Pick someone who has experience in test automation but more of broad expertise in software development in general.
- Engineering savvy champion- these champions have a clear vision, gather experiences from multiple sources, and enforce the right technical approach, processes, and guidelines that’ll significantly improve quality.
- A right balance between manual and automated testing can actually help gain better returns.
In typical DevTestOps culture, all the teams will work together to streamline processes that promote in-built product quality in line with the culture.
Watch the video on “Test Automation: An enigma that continues to haunt” by our President, Vasudevan Swaminathan.
Getting QA started with DevOps
If you are attempting to get QA started with DevOps in your organization but don’t know-how, you can jump-start by measuring these 3 metrics
Defect Containment | Log maximum of 95% defects in QA, UAT & Production |
---|---|
Team Productivity | Keep the backlog reworks to a maximum of 10% only |
Lead Time | Aim to push code to production every day |
All of these activities set up for a continuous integration, continuous testing, continuous feedback processes, helping teams build better software faster, and making the journey of DevOps worthwhile.
DevOps testing strategy
Generating an optimal DevOps testing strategy requires a detailed assessment of the software and a mix of other elements to plan for a streamlined testing structure.
Let’s check out the focus areas for a successful DevOps testing strategy.
Automate user behavior, not tests
One should aim to prevent defects arising in the production with the help of automated tests. One way to achieve this and contain defects earlier is by deploying automation frameworks and layer it with a Test-Driven Development (TDD) /Behavior Driven Development (BDD), which focuses on automating user behavior and not just tests. Following this approach ensures greater testability, maximum code coverage, and active collaboration among teams.
Example of automating user behavior using Gherkin
Optimize test environment
In addition to writing the right automation test scripts, we should plan to optimize a test environment that’ll encompass user conditions, relevant test data, and the capability to cope with varying peak times, product requirements, etc. to fit into the entire DevOps strategy.
These will help to mitigate quality issues much earlier in the process.
Analyze critical test data
It is evident that with the running of large volumes of test suites, the amount of test data generated will also be enormous. It becomes significantly necessary to check and analyze these test data to gain visibility into the state of quality of the software, discover the CI pipeline’s health, and identify test anomalies that help steady the continuous tests helping the software release cycles.
Measure continuously
To understand where we stand in DevOps maturity, we should continuously measure KPIs that contribute to the software’s quality,
A few of them include,
- Identify defects by phase, stage, cause, functionality, and trend
- Percentage of defects escaped to production
- Pinpoint manual vs. automated testing defects
- Trace flaky test trend
DevOps testing best practices
Here are some general best practices for implementing an efficient testing process into the DevOps structure
Smart automation
We have already addressed in detail about the significance of automation in DevOps; however, this doesn’t mean automated testing can alone help every time. The key to employing successful automation is to find automatable tests first.
Few tests like usability, post-deployment tests are better off when tested manually.
Agile iteration
Focus on rapid and quick iterations among each team leads to our goal of continuous delivery. A sequence of smaller and agile developments enables teams to test thoroughly and push for quicker deployments. These iterations give insight into the changes being made and the ability to ensure deployments happen more often and more early.
DevOps metrics and documentation
As the name suggests, DevOps is all about collaboration among teams. As we get started with it, there needs to be clear and defined metrics and documentation. It provides information about the processes and changes that are taking place in the system.
Additionally, it enforces transparency, and without proper documentation in place, it’s very difficult to review and understand what worked and what hasn’t in your DevOps structure. Also, it forms a base to enable decision-making for the future.
DevOps testing tools
As DevOps is built on top of the agile focused on the usual software testing life cycle and not an out of the box testing altogether, tools used for the usual testing process can be leveraged for testing in DevOps too.
Here are some of the commonly used testing tools,
- Selenium
- Jenkins
- Appium
- Cucumber
- TestNG
- Maven
- Appium
- Bamboo
Final thoughts
Though there are a plethora of resources available to guide you on the testing in DevOps, successful implementation and reaping full benefits of DevOps depend on the organization’s test maturity, and its external consulting/test partner as no one size fits all.
Related read/watch:
Related Posts
Kavya Ravichandran is a skilled content writer with a flair for crafting narratives that educate and engage. Driven by a love for words and an innate curiosity, she explores various topics in the digital space, focusing on application development and modernization, UI/UX design, and emerging technologies like DevOps, AI, and more. She is adept at tailoring her narratives to suit different audiences and platforms, ensuring her work is both relevant and insightful.
Pavithra Anandan is a solution driven IT specialist with over 12 years of experience, including 7 years in manual and automation testing and 5 years as a Business Analyst. She excels in understanding customer business needs and translating them into actionable requirements. Proficient in Agile methodology, she is adept at requirements gathering, epic and user story development, backlog management, and fostering collaboration with cross-functional teams. Her consulting experience spans various industries, including Postal, E-commerce, Automotive, and Airline sectors. Currently, as a Product Owner at Zuci, she focuses on advancing postal logistics by enhancing operational efficiency and driving customer satisfaction through innovative delivery solutions
Minna is a content developer specializing in software testing and Robotic Process Automation (RPA). She enjoys exploring the intricacies of cutting-edge software and knits comprehensible content that resonates with the audience. PS, she is a book lover.
Kavya Ravichandran is a skilled content writer with a flair for crafting narratives that educate and engage. Driven by a love for words and an innate curiosity, she explores various topics in the digital space, focusing on application development and modernization, UI/UX design, and emerging technologies like DevOps, AI, and more. She is adept at tailoring her narratives to suit different audiences and platforms, ensuring her work is both relevant and insightful.
An experienced and adaptable IT leader, Gopalakrishna Raju boasts over 18.5 years of expertise in service delivery management, project management, and database administration. A strong advocate for continuous service improvement and automation, he strives to bring productivity and cost benefits for clients. Certified in Oracle, AWS, and Microsoft Azure, he has received numerous accolades, including the Top Achiever FY23 Spot Award at Zensar and multiple awards at Wipro. When not busy setting up operational models, and delivering successful outcomes, he enjoys playing badminton and cricket.
Simran is a professional with over 18 years of diversified experience in business intelligence and data analytics, strategy planning, key account management and new product development. She has worked in the technology industry, consumer goods industry, retail and market research.
Gayathri Krishnan is a seasoned IT professional with over 15 years of experience, spanning 4 years in manual testing and 9+ years as a business analyst in the General Insurance and Logistics sectors. With more than 2 years as a delivery lead, she has a proven ability to manage end-to-end project lifecycles and transform business requirements into effective solutions. Her expertise covers multiple lines of business within general insurance, including Motor, Health, Personal Accident, Fire, Marine, Engineering, and Rural insurance. Skilled in Agile methodologies, Gayathri excels in requirements gathering, backlog management, client engagement, and leading cross-functional teams. As a Product Owner at Zuci, Gayathri specializes in aligning business and technical requirements to enhance operational efficiency in postal logistics services.
Sona Jayakumar is a Senior Business Analyst with three years of experience in the ESG (Environmental, Social, and Governance) and Healthcare sectors. She specializes in digital transformation and process optimization, focusing on aligning business strategies with innovative solutions. Her expertise in stakeholder management and cross-functional collaboration has consistently delivered impactful results and improved operational efficiency.
Minna is a content developer specializing in software testing and Robotic Process Automation (RPA). She enjoys exploring the intricacies of cutting-edge software and knits comprehensible content that resonates with the audience. PS, she is a book lover.
Minna is a content developer specializing in software testing and Robotic Process Automation (RPA). She enjoys exploring the intricacies of cutting-edge software and knits comprehensible content that resonates with the audience. PS, she is a book lover.
Rama Jayaraman is a Certified Public Accountant (USA), CA (Intermediate) and Commerce graduate. She is certified in Professional Scrum Master I and has working knowledge of multiple tools like Tableau, Power BI, Smartsheet, Azure Devops and multiple other Microsoft tools. She is a Seasoned Professional with 8+ years of experience with a proven track record in Project Management and Risk Management through a solution-oriented approach. She has managed and lead key projects in the areas of Automation, Analytics, Auditing, Financial Reporting and Internal Control. She has worked for companies like KPMG, Maersk and Standard Chartered Bank. Currently supporting The Officer of Inspector General (The Global Fund) as part of the Zuci family. She is a trained singer who has participated and won competitions. During her spare time, she has also volunteered as a coach and conducted swimming classes for the underprivileged and visually challenged.
Ameena Siddiqa is a seasoned marketer with hands-on experience in curating captivating content on the latest cloud, devops and enterprise technology trends. With a keen eye for emerging trends and a passion for storytelling, she has a knack for transforming complex concepts into engaging narratives that resonate with audiences across industries.
A web-analytics nerd, speaker - here delving into (Big)-data.
A web-analytics nerd, speaker - here delving into (Big)-data.
Minna is a content developer specializing in software testing and Robotic Process Automation (RPA). She enjoys exploring the intricacies of cutting-edge software and knits comprehensible content that resonates with the audience. PS, she is a book lover.
Rajalakshmi Sivaramakrishnan is a Lead Business Analyst with 17 years of experience in various fields, including Business Analysis, Identity Access Management, Requirement Engineering, and Business Intelligence. She excels in automating processes, aligning business and technology, and has domain expertise in retail banking and capital markets.