Continuous Development: The glue holding DevOps, TDD and Agile methods together
By Jason Tee
It seems you can't discuss continuous integration (CI) and delivery without talking about three other very deeply interrelated topics: Agile, DevOps, and a testing strategy such as behavior driven or test driven development (BDD or TDD). Here is how these methodologies, processes and strategies are intertwining in the software development environments of the most forward thinking organizations.
It all starts with Agile
John Smart, author of Jenkins: The Definitive Guide, understates the case a little when he says, "With continuous delivery, it helps if it's Agile—trending toward Lean. You're getting away from the whole idea of a release cycle over a period of 3 to 6 months to a year. Instead, you've got a piece of functionality that goes into the pipeline. When it's done, it can be released." It would actually be a little difficult to envision doing anything continuously with a traditional Waterfall methodology. Wouldn't that turn it into a Whirlpool?
Reality needs to catch up with the terminology
In a way, one of the biggest benefits of continuous integration is that it offers a simple way to get a grasp on both Agile and DevOps. These two terms have been diluted so much that they have been rendered almost meaningless by improper use. Paul Swartout, author of Continuous Delivery and DevOps: A Quickstart Guide, describes a typical scenario. "Everyone says they work in an Agile way. But when you dig deeper, they admit that they do analysis and specs up front along with the requirements, but they do it in two weeks. What they are really saying is that they are doing waterfall in two weeks."
The same is true of DevOps, says Swartout. "People don't get the word. They don't know what it means. It's about how you do things, the way you're working, and your culture." In contrast, continuous integration emphasizes the how rather than the who. This simple shift in focus clarifies the issue tremendously. Swartout says he noticed the pattern linking Continuous Delivery and DevOps when working with small teams. You don't have clearly defined development and operations roles. You just have a group of people working together to deliver software. You're continuously delivering software through a pipeline. In a way, that's what DevOps is really about. He encourages organizations to go back to a small group mindset, allowing engineers and operations teams to work so closely together that there's a blurring between the two.
Throwing behavior driven development into the mix
Behavior Driven Development (BDD) and CI appear to be a match made in heaven. According to Smart, BDD is an approach where you specify and design an application by describing its behavior from the outside. This involves having high level discussions using specific, realistic examples. Stakeholders tell you how they expect the system to behave. You turn those expectations into acceptance criteria to drive out what you need to develop. The same approach also works at a more granular level since you can treat one layer of code as a client for another layer of code.
BDD can be a very effective way of doing a continuous process. "It's a lot more fluid and lean. Anything you build is directly focused on contributing to implementing the expected behavior. There's less gold-plating and fluff," says Swartout. The benefits of enhanced communication are obvious. "You minimize the risk of assumptions getting in the way. Since you are using concrete examples, you can use these as acceptance criteria. Then, you have a feedback loop from the business side to automated tests and back to the business as test reports."
Swartout points to the connection between Agile and BDD. "With Agile, you have a story and a definition of done. Part of that definition should be that it's performant and functional. But you have to prove it. That opens up more opportunity for engineers to think." When you know from the start that the end product has to prove itself, you can't help but have a BDD mindset. It's kind of a positive way of teaching to the test for software development.
Pulling it all together
So, what does it look like when you blend all of these best practices—and get just the right mix?
Agile: Breaks you out of the traditional over-plan, under-deliver approach and gives you the flexibility to support the implementation of the other three methodologies.
DevOps: Brings your team together and enhances communication so both developers and operations engineers get more input in the project from start to finish.
Continuous Integration and Delivery: Supercharges the feedback loop for speed and effectiveness while bringing the automation process fully online.
Behavior Driven Development: Gets rid any activities that aren't necessary, making less work for everyone and giving stakeholders exactly what they want.
Clearly, the continuous process of integration, development and deployment does not exist as an island unto itself. Instead, it is an essential piece of a much larger puzzle that comes together to create productive and efficient development environments. When organizations can effectively mix Agile, DevOps, CI and effective testing strategies like BDD and TDD, delivering high quality software becomes a lead pipe cinch.
05 Feb 2014