Continuous Delivery: You're Doing It Wrong!
In this article, Alex Martins discusses why you should focus on building quality into an application instead of saving it for testing later.
Join the DZone community and get the full member experience.Join For Free
i see many successful devops teams (yes, there are quite a few already!) at a point in their journey where they have learned to work together as one , without any walls between them, and are now focused on increasing delivery speed. that’s when they put continuous delivery (cd) at the top of their agenda.
when most people think about cd, they think of improving the build-test-deploy-operate cycle. they don’t think about how to accelerate and improve the intake process. ensuring that quality is built into the application (not tested for after the fact) is the key to achieving the desired acceleration through cd. testing and quality assurance organizations are definitely trying to transform themselves to become the enablers of the acceleration in the cd pipeline (check out
the gap in cd acceleration
organizations working to achieve cd soon realize that they are great at building things right and with speed. however, they are still unsure as to whether they are building the right things. there is a difference between the two and, in my experience, this is a gap in cd initiatives.
just last week, i was invited to an all-day devops transformation workshop at a large multinational company where they gathered their business, development, testing, operations, pmo, and enterprise architecture teams. that was the first session in their journey, and the objective that day was for the different teams to agree on common terminology across the groups and also identify the priority areas they would want to start working on improving. they were asking me for some coaching to make sure that they were going down the right path.
it was clear that day that all conversations inevitably converged on how to accelerate the code development, testing, and deployment to the different environments. however, no one questioned whether they were using the right inputs (i.e., clear, unambiguous requirements) before they started coding, testing and deploying. that’s when i jumped in to drive the session.
so, how do you ensure you are building the right things and you’re building them fast? you focus on improving and accelerating the requirements-gathering process regardless of whether you’re in a traditional or agile organization.
a good example of this is the way that requirements are communicated across different teams. requirements are the foundation of everything in the software development lifecycle (sdlc) and yet, after 30 years, they are still being communicated the same way across different teams: through the written language. they are written in word or excel documents or in requirements management tools. that is a completely manual process.
naturally, a manual process becomes a bottleneck in a highly automated cd pipeline where the ultimate goal is speed with quality. not only that, but requirements written in text many times are ambiguous and open to interpretation. ambiguity is the cause of approximately 56% of defects introduced in the application code. the first version of the famous figure below was released over 10 years ago by projectcartoon.com , but unfortunately, it is still relevant. each team involved in the sdlc has different interpretations and expectations of the requirements.
agile software development methodologies and more recently cd practices are all aiming to prevent this from happening. they shift the software development paradigm to short iterations and continuous feedback across teams to ensure that any communication gaps or inaccurate expectations, which all lead to requirements ambiguity, are identified and addressed earlier in the lifecycle, truly “shifting left” all quality-related activities to prevent defects instead of testing for defects. however, most of these activities are manual, which slows down the cd pipeline.
still too much manual effort
in addition to requirements acceleration being overlooked in cd initiatives, i also see many companies i work with still doing a lot of things manually that they could be automating.
- test cases are still designed the same way: by reading requirements documents or user stories and designing test cases and test steps. the process is manual and unsystematic. the test case coverage is dependent on the test case writer and their understanding of the requirements.
- test automation is still not pervasive in the sdlc. around 70% of all testing is still done manually . teams that have achieved better levels of automation still struggle because creating the automated tests is still a very manual process. developers doing test-driven development (tdd) or test automation engineers still have to manually write code to automate tests in the application. depending on the developer or engineer, automated test scripts will achieve different levels of test coverage and need to be maintained over time, which also requires more manual effort.
- test data is always a bottleneck and a pain point for most organizations as it takes up around 50% of the tester’s time . at a very simple level, usually, they address it by taking a copy from production data, masking it, and making it available to preproduction environments. this process is usually a blend of manual and automated processes that are very time-consuming (i.e., days to weeks). unfortunately, based on what i typically see across the organizations that i work with, the data variety in production usually covers only 10-20% of the test cases. that means that additional time is needed to manually create and prepare and massage data.
- interfaces to other systems (i.e., through apis, web services, etc.) are always challenging because, usually, 56% of those dependencies are not available for developers and testers . those interfaces either don’t have the capacity required by the system under test (sut) or simply have not been built yet. this slows down development and testing time as the interfaces have to be stubbed in order for the application code in scope to be tested.
so we hear a lot of automation talk across the cd pipeline and that we must eliminate as many manual activities as possible in order to achieve maximum acceleration. however, it is clear now that we still have work to do.
requirements as the foundation for cd
when an architect is designing a house, they start with a rough sketch or a blueprint. that blueprint is then reviewed iteratively with the client. once the client is satisfied, the architect baselines the blueprint and shares it with the other persons in the design process, such as the interior designer and the electrical engineer. they then add their designs as layers on top of that foundational blueprint created by the architect.
obviously, this is a very high-level take on the process of designing a house, but stay with me. you’ll get the analogy coming up.
architects and the other roles in the process described above use computer-aided design (cad) software in design projects. the software helps them tie all design layers (from the different persons) to the foundational blueprint and keeps full traceability across all of them. so, through the cad tool, each person can see the full project with all layers turned on or they can simply turn on their own layer (i.e., plumbing, electrical) in order to see only what pertains to them. the main advantage is that everyone involved is working off of the same foundational blueprint and everyone understands how it all fits together at the project level.
the best part is when there is a change in any of the layers. the software automatically identifies the impact of the changes across all layers and prompts the user to take action to update a specific layer and address the impact on it. there are a lot of automated suggestions for each owner of an impacted layer on how they can implement a fix to the layer. see below an example of multiple layers in a factory design project represented in a cad tool.
truly shifting left and achieving maximum lifecycle acceleration
now, imagine if these building design concepts, techniques, and tools existed in the software design world. unambiguously define a requirement? keep full traceability across application screens, code, manual tests, automated tests, test data, interfaces (virtual or real), defects, etc.? no need to keep on imagining. i know many companies that have already moved to true full cd pipeline acceleration by starting with the requirements and then going to coding, testing and releasing.
stay tuned and i’ll share a detailed approach on how to apply these building design techniques to software design.
Published at DZone with permission of Alex Martins, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.