@DevOpsSummit Authors: Jason Bloomberg, Stackify Blog, Aruna Ravichandran, Otto Berkes, Ayman Sayed

Related Topics: @DevOpsSummit, Containers Expo Blog, @CloudExpo

@DevOpsSummit: Article

Test-Driven Development By @ElectricCloud | @DevOpsSummit #DevOps

Automated software testing continues to play a vital role in enterprise software delivery

Measure Twice - Cut Once: The Benefits of Test-Driven Development

Automated software testing continues to play a vital role in enterprise software delivery and the speed with which software-driven organizations can begin to produce value. You want to ensure quality software, alongside fast time to market. How do you balance the need for speed with the need to test everything to deliver high-quality software to the end user?

At last year's DevOps Enterprise Summit, which Electric Cloud hosts in partnership with Gene Kim, author of The Phoenix Project, Kim asked every speaker to end their presentation with a slide that covered one of the two following topics: "Here's what I don't know how to do" or "Here's what I'm looking for help with." This gave all attendees at the summit insight into the top enterprise IT problems facing the DevOps community at large. It came as no surprise that several of the top challenges revolved around the concept of testing, and more specifically, the focus on better strategies and tactics for creating automated tests for legacy applications.

DevOps and test-driven development
I'm fascinated with the concept of testing in the software development cycle because this is where a lot of the value lies. What good is a killer feature if it doesn't work or a new release if it gets postponed for months as you try to fix various bugs? Streamlining and accelerating testing not only speeds up your feedback loops-and your entire delivery pipeline-but also serves as the most immediate gratification and validation point in your process: you've developed a new feature, and you've proven that your code works!

Talking with customers, it becomes obvious that there's no "one size fits all" in DevOps in general and in software testing in particular. Organizations need to develop the patterns and processes that make the most sense for their teams and their business. For some, test-driven development (TDD) may prove an effective practice to promote both product quality and faster delivery time.

In many developers' minds, TDD might seem like a completely backwards process-the idea that a test dictates how and what you develop might seem topsy-turvy. But in reality, TDD is an incredibly effective development method that can lead to robust, stable, and high-quality releases. I want to share some of the issues I've faced with my work in TDD, along with ways to overcome them in your journey to take advantage of TDD as an effective tool in your development arsenal.

When following a TDD approach, the developer first writes an automated test case to test a new functionality or revision to the code. This initial test case will fail, at first. Then the developer writes the minimum amount of code in order to pass the test. Once the test passes, the developer refactors the code to acceptable standards, to eliminate redundancy. This process is then repeated over and over again as the code evolves and more functionality is added. TDD is therefore an iterative, incremental way to add value to your code while you gain more confidence that the code is viable and working with each new iteration all the way into production.

Pros and cons
Before we dive any deeper, let's talk about the good news and bad news.

Starting with the bad news: approaching software development with a TDD mindset can be intimidating. When you sit down to start developing a new feature, you first need to think of all the things for which you need to build a test, which requires some planning. For less experienced developers, it can be overwhelming. They might feel it's better to dive in to the code first before designing a suitable test. It takes practice and experience to determine the minimum viable test for validating each limited set of functionality that's being developed and expand on that initial test case as your code evolves. It's a matter of finding the right balance.

To validate that your code does what it's supposed to do, you have to make sure you address as many plausible issues as possible as you flesh out the functionality. Then again, you also need to be mindful not to go down a rabbit hole of designing a test for each rare corner case that might never occur. Finally, you don't want to be thrown off track by designing test cases that are so complex that it takes too long to complete the corresponding codebase to test against.

One straightforward way to address these two issues is a trick called "hazard analysis": the process of identifying probable issues, putting them in order of most to least likely, and then beginning the mitigation effort from there. By building a list that lets you decide what's most worthy of your time, you won't be chasing those one-in-a-billion bugs that are next to undetectable. A hazard analysis allows you to stay focused and keep your eyes on the prize. Catching bugs earlier, as part of your development process (rather than having to wait for QA, or worst yet, discovering them in production) is the best, most cost-effective way to ensure that quality code makes it to end users faster.

A mindset shift
While TDD requires developers to invest the time and effort to hone their testing skills, the organization benefits from creating a design of the right procedures to test code more efficiently. Still, beyond the technical hurdles (assuming we're all accomplished engineers), another common hurdle to TDD for developers is psychological-the feeling that they're not actually getting anything done. Traditional development is like building a house-you spend a whole day working, you've laid some foundation, and you can clearly measure your progress. With TDD, you spend the first day (or week, or month) just figuring out how your foundation might crack and where it might need extra support, and it might feel like you have nothing to show for it. That can be a tough feeling to overcome.

Approaching this issue with the right frame of mind can help you get past it. TDD is just like the age-old carpenter's saying, "measure twice-cut once." By spending your time building tests and looking for potential issues (measuring), by the time you actually get to the development of your release (cutting), you can feel pretty confident that your code will work the way it should. And if it doesn't, the development team will have a quick feedback loop through which to discover that. So while the developers who start coding their new feature on day one might feel like they've reached the finish line faster, in the grand scheme of things (especially if any bugs are discovered downstream), fixing them will take much longer when you're trying to stabilize your code for release.

Along those same lines, don't think you won't feel any sense of accomplishment with TDD. Once you have your tests in place and you're working single-mindedly on passing them, you get the satisfaction of knowing your code passes the test and that you're the new best friend of all your QA colleagues who won't need to spend as much time on your code when it reaches the testing stage. For me, watching the light turn green on one of my tests is as much a feeling of accomplishment as launching an entire release.

Another key adjustment in TDD is the fact that it's slow, or at least it feels slow. When you're spending so much time building tests and thinking of possible pitfalls, your actual development process can feel like it's slowed down-especially if you're used to throwing your code over the wall to QA and letting them find the bugs for you. I often warn people who are just starting with TDD to take whatever development time they're used to and then double it. While it may sound like a big investment, you have to think about what you're getting for your additional efforts.

The payoff
When starting your development process by testing first, you won't have to do nearly as many tests at the end of your development cycle-and once you do deploy, things are much less likely to go south. It's much easier to fix something that's broken before it's released, rather than after it's in the hands of the user. Imagine if I told you that never again will one of your releases break once it's out in the wild-doesn't that sound nice? While TDD can't promise that, it significantly decreases the likelihood of your code breaking after you've released it. Hitting the "go" button and knowing that you put a lot of time and effort into preventing any potential snags feels so much better than hoping and praying that nothing goes wrong.

TDD isn't for everyone, and for some people, the shift in mindset can be challenging. But if you can really focus on the "measure twice-cut once" mentality of TDD, you can see some amazing results. I hope you give it a try and see for yourself how TDD can fit into your next development cycle.

To see this article in its original publication visit TechBeacon.com (http://techbeacon.com/measure-twice%E2%80%94cut-once-benefits-test-drive...)

More Stories By Anders Wallgren

Anders Wallgren is Chief Technology Officer of Electric Cloud. Anders brings with him over 25 years of in-depth experience designing and building commercial software. Prior to joining Electric Cloud, Anders held executive positions at Aceva, Archistra, and Impresse. Anders also held management positions at Macromedia (MACR), Common Ground Software and Verity (VRTY), where he played critical technical leadership roles in delivering award winning technologies such as Macromedia’s Director 7 and various Shockwave products.

@DevOpsSummit Stories
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to great conferences, helping you discover new conferences and increase your return on investment.
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and controlling infrastructure. The rise of Site Reliability Engineering (SRE) is part of that redefinition of operations vs development roles in organizations.
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering management. To date, IBM has launched more than 50 cloud data centers that span the globe. He has been building advanced technology, delivering “as a service” solutions, and managing infrastructure services for the past 20 years.
The next XaaS is CICDaaS. Why? Because CICD saves developers a huge amount of time. CD is an especially great option for projects that require multiple and frequent contributions to be integrated. But… securing CICD best practices is an emerging, essential, yet little understood practice for DevOps teams and their Cloud Service Providers. The only way to get CICD to work in a highly secure environment takes collaboration, patience and persistence. Building CICD in the cloud requires rigorous architectural and coordination work to minimize the volatility of the cloud environment and leverage the security features of the cloud to the benefit of the CICD pipeline.
"ZeroStack is a startup in Silicon Valley. We're solving a very interesting problem around bringing public cloud convenience with private cloud control for enterprises and mid-size companies," explained Kamesh Pemmaraju, VP of Product Management at ZeroStack, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native applications. However, sharing a Kubernetes cluster between members of the same team can be challenging. And, sharing clusters across multiple teams is even harder. Kubernetes offers several constructs to help implement segmentation and isolation. However, these primitives can be complex to understand and apply. As a result, it’s becoming common for enterprises to end up with several clusters. This leads to a waste of cloud resources and increased operational overhead.
"Infoblox does DNS, DHCP and IP address management for not only enterprise networks but cloud networks as well. Customers are looking for a single platform that can extend not only in their private enterprise environment but private cloud, public cloud, tracking all the IP space and everything that is going on in that environment," explained Steve Salo, Principal Systems Engineer at Infoblox, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
"CA has been doing a lot of things in the area of DevOps. Now we have a complete set of tool sets in order to enable customers to go all the way from planning to development to testing down to release into the operations," explained Aruna Ravichandran, Vice President of Global Marketing and Strategy at CA Technologies, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Vulnerability management is vital for large companies that need to secure containers across thousands of hosts, but many struggle to understand how exposed they are when they discover a new high security vulnerability. In his session at 21st Cloud Expo, John Morello, CTO of Twistlock, addressed this pressing concern by introducing the concept of the “Vulnerability Risk Tree API,” which brings all the data together in a simple REST endpoint, allowing companies to easily grasp the severity of the vulnerability. He provided attendees with actionable advice related to understanding and acting on exposure due to new high severity vulnerabilities.
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, discussed how data centers of the future will be managed, how the public cloud best suits your organization, and what the future holds for operations and infrastructure engineers in a post-container world. Is a serverless world inevitable?
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buyers learn their thoughts on their experience.
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, which can process our conversational commands and orchestrate the outcomes we request across our personal and professional realm of connected devices.
DevOps promotes continuous improvement through a culture of collaboration. But in real terms, how do you: Integrate activities across diverse teams and services? Make objective decisions with system-wide visibility? Use feedback loops to enable learning and improvement? With technology insights and real-world examples, in his general session at @DevOpsSummit, at 21st Cloud Expo, Andi Mann, Chief Technology Advocate at Splunk, explored how leading organizations use data-driven DevOps to close their feedback loops to drive continuous improvement.
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Sanjeev Sharma Joins June 5-7, 2018 @DevOpsSummit at @Cloud Expo New York Faculty. Sanjeev Sharma is an internationally known DevOps and Cloud Transformation thought leader, technology executive, and author. Sanjeev's industry experience includes tenures as CTO, Technical Sales leader, and Cloud Architect leader. As an IBM Distinguished Engineer, Sanjeev is recognized at the highest levels of IBM's core of technical leaders.
We all know that end users experience the Internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices – not doing so will be a path to eventual business failure.
"Cloud4U builds software services that help people build DevOps platforms for cloud-based software and using our platform people can draw a picture of the system, network, software," explained Kihyeon Kim, CEO and Head of R&D at Cloud4U, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Is advanced scheduling in Kubernetes achievable?Yes, however, how do you properly accommodate every real-life scenario that a Kubernetes user might encounter? How do you leverage advanced scheduling techniques to shape and describe each scenario in easy-to-use rules and configurations? In his session at @DevOpsSummit at 21st Cloud Expo, Oleg Chunikhin, CTO at Kublr, answered these questions and demonstrated techniques for implementing advanced scheduling. For example, using spot instances and cost-effective resources on AWS, coupled with the ability to deliver a minimum set of functionalities that cover the majority of needs – without configuration complexity.
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory? In her Day 2 Keynote at @DevOpsSummit at 21st Cloud Expo, Aruna Ravichandran, VP, DevOps Solutions Marketing, CA Technologies, was joined by a panel of industry experts and real-world practitioners who shared their insight into an emerging set of best practices that lie at the heart of today's digital transformation.
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone innovative products that help customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business and personal computing needs.
As many know, the first generation of Cloud Management Platform (CMP) solutions were designed for managing virtual infrastructure (IaaS) and traditional applications. But that's no longer enough to satisfy evolving and complex business requirements. In his session at 21st Cloud Expo, Scott Davis, Embotics CTO, explored how next-generation CMPs ensure organizations can manage cloud-native and microservice-based application architectures, while also facilitating agile DevOps methodology. He explained how automation, orchestration and governance are fundamental to managing today's hybrid cloud environments and are critical for digital businesses to deliver services faster, with better user experience and higher quality, all while saving money.
SYS-CON Events announced today that Google Cloud has been named “Keynote Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Companies come to Google Cloud to transform their businesses. Google Cloud’s comprehensive portfolio – from infrastructure to apps to devices – helps enterprises innovate faster, scale smarter, stay secure, and do more with data than ever before.