Agile & Scrum Management

Chapter 10
Agile Engineering, Quality and DevOps

Certificate in Software Project Management
Agile & Scrum Management   •   Certificate

Agile Engineering, Quality and DevOps

Introduction

Agile management is not simply the management of short meetings, prioritised backlogs, and frequent demonstrations. An increment is genuinely valuable only when it is technically sound, secure, testable, maintainable, and capable of being released. Agile engineering practices provide the foundation for this condition. They connect product ownership and Scrum events with the daily technical work of creating reliable software.

This chapter examines technical debt, refactoring, automated testing, continuous integration, continuous delivery, version control, and secure development. Together, these practices help a Scrum team produce a potentially releasable increment at the end of each Sprint. They also make quality visible and prevent quality from being postponed until a final testing phase.

Learning Objectives

By the end of this chapter, the learner should be able to:

  1. Explain technical debt and distinguish intentional from unintentional debt.
  2. Describe how refactoring improves internal software quality without changing observable behaviour.
  3. Explain the role of automated testing at different levels.
  4. Describe version control and branching practices that support collaborative development.
  5. Explain continuous integration, continuous delivery, and continuous deployment.
  6. Identify essential secure-development activities.
  7. Relate engineering practices to the Definition of Done and releasable increments.
  8. Evaluate practical trade-offs, risks, and governance considerations in a Scrum environment.

1. Quality in an Agile Product

Software quality has several dimensions. Functional correctness asks whether the system does what users need. Reliability concerns consistent operation. Usability concerns the quality of user interaction. Performance concerns response time and resource use. Security concerns confidentiality, integrity, availability, authentication, and protection against misuse. Maintainability concerns how easily the system can be understood, changed, tested, and operated.

A product increment should therefore be assessed both externally and internally. External quality is visible to users: for example, a payment is processed accurately. Internal quality is visible mainly to developers and operators: for example, the payment module has clear interfaces, automated tests, secure dependency management, and useful monitoring.

In Scrum, the Definition of Done is the shared quality standard for an increment. It may require code review, automated tests, security checks, documentation, deployment to a test environment, and acceptance by the Product Owner. A Product Backlog item that is coded but not tested, integrated, or secured is not finished merely because its visible feature appears to work.

Quality is a shared responsibility. Developers implement and verify quality; testers contribute risk-based evaluation; operations specialists address deployability and observability; the Product Owner clarifies value and acceptance conditions; and the Scrum Master helps remove organisational impediments. This does not mean that everyone performs every technical task. It means that no role can treat quality as somebody else’s final-stage responsibility.

2. Technical Debt

Technical debt is the future cost created when a team chooses, accepts, or inherits a solution that is easier or faster now but more expensive to change, operate, or understand later. The metaphor is useful because debt may be reasonable when managed deliberately, but unmanaged debt accumulates interest.

Examples include:

  • duplicated business logic;
  • obsolete libraries or unsupported platforms;
  • inadequate automated tests;
  • complex code that few people understand;
  • manual deployment procedures;
  • insecure default configurations;
  • undocumented interfaces and operational dependencies;
  • temporary workarounds that become permanent.

Technical debt is not identical to poor-quality code. A conscious decision to use a simple temporary implementation for a time-critical experiment can be legitimate debt if it is recorded, bounded, and repaid. Conversely, code can be badly designed even when nobody explicitly recognises the debt.

Types and causes of debt

Technical debt may be classified as deliberate or inadvertent, and as prudent or reckless. Deliberate, prudent debt occurs when a team understands the consequences and makes a time-bounded trade-off. Inadvertent debt results from limited knowledge, changing requirements, or an evolving design. Reckless debt ignores known consequences, while prudent debt includes a plan for correction.

Debt is often caused by schedule pressure, weak engineering standards, insufficient automated testing, rapid organisational growth, unclear architecture, or frequent changes in product direction. It can also arise from dependencies outside the team’s control, such as a vendor ending support for a platform.

Managing debt

Debt should be made visible in the Product Backlog or an associated technical register. A useful debt item identifies:

  1. the affected component;
  2. the current risk or constraint;
  3. the likely consequence of leaving it unresolved;
  4. an approximate remediation approach;
  5. evidence that the debt has been reduced.

The team should not treat every technical improvement as an emergency. Prioritisation should consider user impact, security exposure, probability of failure, operational cost, and the cost of delay. A severe vulnerability, for example, normally receives priority over a minor style inconsistency.

A simple qualitative model is often more useful than false numerical precision. Teams may classify debt as low, medium, or high according to impact and urgency. If quantitative data is available, one useful conceptual relationship is:

Total debt cost = remediation cost + accumulated carrying cost

The terms are not a universal accounting formula. “Remediation cost” means the effort and resources required to correct the problem, while “carrying cost” means the additional maintenance, delay, failure, or risk caused by leaving it in place. The relationship is a planning model, not a precise financial valuation.

3. Refactoring

Refactoring is the disciplined restructuring of existing code without changing its externally observable behaviour. Examples include extracting a method, simplifying conditional logic, renaming misleading identifiers, removing duplication, and separating responsibilities.

Refactoring is not the same as rewriting. A rewrite replaces a larger part of a system and introduces significant delivery risk. Refactoring makes small, controlled changes while preserving behaviour. Automated tests are particularly important because they provide evidence that the intended behaviour remains intact.

A safe refactoring cycle is:

  1. establish or improve a test that captures current behaviour;
  2. make one small structural change;
  3. run relevant automated tests;
  4. inspect the code and integration result;
  5. commit the change when the system is stable;
  6. repeat as necessary.

Refactoring should be connected to product work. For example, before adding a new pricing rule, a developer may simplify a tangled pricing module. This is sometimes called refactoring toward change. It improves the design where the next requirement will arrive rather than attempting to redesign the entire system.

Refactoring has limits. It cannot compensate for an unsuitable architecture, missing product knowledge, or inadequate tests. It also consumes capacity. A team should explain the expected benefit, keep changes reviewable, and avoid using “refactoring” as a label for uncontrolled redesign.

4. Automated Testing and the Agile Test Strategy

Automated tests execute repeatable checks and report whether observed results match expected results. They do not prove that software is completely defect-free. They provide evidence about selected behaviours under selected conditions.

A balanced test strategy commonly includes the following levels:

LevelMain purposeTypical scopeFeedback speed
Unit testVerify a small component in isolationFunction or classVery fast
Component or service testVerify a module through a stable interfaceService or subsystemFast to moderate
Integration testVerify interaction between components or external systemsDatabase, API, queueModerate
End-to-end testVerify a complete user journeyWhole deployed systemSlower
Exploratory or usability testDiscover unexpected, experiential, or contextual problemsProduct behaviourVariable

The frequently used “testing pyramid” expresses a risk-management idea: many fast, focused unit tests, fewer service and integration tests, and a smaller number of broad end-to-end tests. It is not a rigid law. A system dominated by user-interface behaviour, hardware interaction, or complex integration may require a different distribution.

Good automated tests are deterministic, independent where practical, readable, fast enough for their purpose, and maintained as production code changes. Tests should assert meaningful outcomes rather than implementation details that are likely to change. Poorly designed tests can become a form of test debt: they are slow, flaky, difficult to understand, or so tightly coupled to implementation that developers avoid changing the system.

Test-driven development (TDD) is a development practice in which a developer writes a failing test, implements the smallest change that makes it pass, and then refactors. TDD can improve design and clarify expected behaviour, but it is not a substitute for system testing, security assessment, or product validation.

Acceptance tests express conditions under which a Product Backlog item is acceptable. They may be automated, manual, or both. A useful acceptance condition is observable and specific, such as: “When a valid payment is authorised, the order status changes to Confirmed and a confirmation event is recorded.”

5. Version Control and Collaborative Development

Version control records changes to files and allows a team to compare, restore, review, and combine work. A repository normally contains the current source, its history, and configuration needed to build or test it. Version control supports traceability: a release can be linked to commits, reviews, tests, and work items.

A practical workflow includes:

  1. updating the local working copy;
  2. creating a small, focused change;
  3. running local checks;
  4. committing with a meaningful message;
  5. pushing the change to the shared repository;
  6. obtaining review and automated validation;
  7. integrating it promptly.

A commit should represent a coherent change that can be understood and, where necessary, reverted. Committing generated secrets, passwords, private keys, or large temporary files is dangerous. Sensitive values should be stored in an approved secrets-management system, not in source code or ordinary repository history.

Teams may use different branching models. A long-lived feature branch isolates unfinished work but increases divergence and merge risk. Trunk-based development keeps branches short-lived and integrates frequently. A team may use feature flags to merge incomplete functionality safely while keeping it unavailable to users. The appropriate model depends on system architecture, release controls, regulatory requirements, and team capability; no branching model removes the need for communication and testing.

Code review is a quality and learning practice. Reviewers should consider correctness, security, maintainability, tests, observability, and consistency with the architecture. Review should not become an approval ritual that creates a queue. Small changes and automated checks make review faster and more effective.

6. Continuous Integration

Continuous integration (CI) is the practice of integrating changes into a shared codebase frequently and validating them automatically. A CI pipeline may compile or package the software, run unit and integration tests, perform static analysis, check dependencies, and produce an auditable result.

A healthy CI system has a short feedback cycle, reproducible builds, clear failure messages, and ownership for repairing broken builds. A broken main branch is a delivery risk. Teams should stop adding unrelated changes until the failure is understood and resolved, or isolate the known problem with an explicit, time-bounded decision.

CI is more than a server running tests at night. It is a team behaviour: small changes, frequent integration, automated validation, and rapid response to failures. If integration occurs only near the end of a Sprint, the team experiences delayed conflict discovery and loses much of the benefit of agile development.

7. Continuous Delivery and Deployment

Continuous delivery means keeping software in a state in which it can be released reliably whenever the organisation chooses. The delivery pipeline typically builds an immutable artifact, tests it, checks security and policy conditions, deploys it to progressively realistic environments, and records evidence.

Continuous deployment goes further: every change that passes the required automated and governance controls is deployed automatically to production. Continuous delivery does not require automatic production release; a business or operational approval may remain a deliberate decision.

A typical pipeline is:

Commit → Build → Unit tests → Security and quality checks
       → Integration tests → Package artifact → Deploy to test environment
       → Acceptance/operational checks → Release decision or production deployment

Deployment and release are distinct. Deployment places software in an environment; release makes functionality available to users. Feature flags, canary releases, blue-green deployment, and staged rollouts can separate these activities and reduce risk. These techniques require disciplined configuration, monitoring, rollback or roll-forward planning, and removal of obsolete flags.

Delivery should include operational readiness. A releasable increment needs appropriate logging, metrics, alerts, backup and recovery considerations, support documentation, and a known response to failure. A system that passes functional tests but cannot be observed or safely recovered is not operationally ready.

8. Secure Development

Security must be built into the product lifecycle rather than added immediately before release. Secure development includes understanding threats, reducing attack surface, protecting secrets, validating inputs, controlling access, managing dependencies, and responding to vulnerabilities.

Important practices include:

  • threat modelling for significant features and architectural changes;
  • secure coding standards and peer review;
  • input validation and output encoding appropriate to the context;
  • least-privilege access;
  • secure authentication and session management;
  • encryption in transit and, where appropriate, at rest;
  • dependency and container vulnerability scanning;
  • static and dynamic security testing;
  • security logging without exposing sensitive information;
  • prompt patching and incident-response preparation.

Security checks should be risk-based. Automated scanners can identify known patterns and vulnerable dependencies, but they produce false positives and may miss business-logic flaws. Human review remains important, particularly for authorisation, privacy, trust boundaries, and misuse cases.

Privacy and compliance obligations may affect retention, access, consent, data residency, auditability, and breach response. A team should involve appropriate security, legal, privacy, and compliance specialists when the product handles personal, financial, health, or otherwise sensitive data. Ethical development also requires considering vulnerable users, discriminatory outcomes, accessibility, and the consequences of system failure.

Artificial intelligence can assist with code suggestions, test generation, dependency analysis, and log classification. However, generated code may contain insecure assumptions, licensing problems, hallucinated libraries, or hidden defects. Teams must review, test, and govern AI-assisted output just as they would human-authored code. Confidential source code and personal data should not be submitted to an AI service unless organisational policy and contractual safeguards permit it.

9. Engineering Practices and the Releasable Increment

The practices in this chapter reinforce one another. Version control provides traceability; code review improves shared understanding; automated tests provide rapid evidence; CI identifies integration problems; continuous delivery makes release repeatable; security practices reduce exposure; and refactoring controls the growth of technical debt.

A team can express this relationship through its Definition of Done. For example, a Product Backlog item may be considered done only when:

  • acceptance criteria are satisfied;
  • code is integrated into the shared branch;
  • automated unit and relevant integration tests pass;
  • exploratory testing has addressed important risks;
  • security and dependency checks are complete;
  • documentation and operational information are updated;
  • the change is deployable through the standard pipeline;
  • monitoring and rollback considerations are addressed.

The exact criteria should match the product and its risk profile. A medical system, public-sector service, or payment platform may require stronger evidence than a low-risk internal prototype. The principle remains constant: quality criteria are agreed before work is called complete, not negotiated after the Sprint has ended.

Applied Case: Illustrative Online Appointment Service

Background

A small Scrum team develops an online appointment service for a health provider. Patients can search for available times, book appointments, cancel bookings, and receive notifications. The service processes personal information and therefore has significant privacy and availability requirements.

Problem

Initially, the team delivers visible features quickly. After several Sprints, releases become difficult. The application contains duplicated booking logic, manual deployment steps, unreliable end-to-end tests, and an outdated third-party library. A production defect allows two users to book the same appointment under a rare timing condition. Developers avoid changing the booking module because tests are slow and failures are difficult to interpret.

Analysis

The team identifies several connected risks. Duplicated logic increases the chance that one booking path will be corrected while another remains defective. The outdated library creates a security and support risk. Manual deployment makes releases inconsistent. The unreliable tests reduce trust in automation, while the missing concurrency test leaves an important business rule weakly protected.

Approach and solution

The Product Owner and team add technical work to the Product Backlog and revise the Definition of Done. The team first creates focused tests for booking invariants, including the rule that one appointment slot cannot be confirmed twice. It then refactors duplicated booking logic behind a common service interface. Changes are made in small commits and reviewed through the repository.

A CI pipeline runs unit, integration, and selected concurrency tests on every change. Dependency scanning identifies the outdated library, which is upgraded after compatibility testing. Secrets are removed from configuration files and supplied through an approved secrets store. The deployment process is converted into a repeatable pipeline that creates one versioned artifact and promotes it through test and production environments.

The team adds structured audit events without placing unnecessary personal information in logs. Operational dashboards show booking failures, response times, and notification delays. A staged release is used for the next production change, with a documented rollback procedure and an explicit release decision.

Outcome

The team can now integrate changes daily and release smaller increments with greater confidence. The booking defect is prevented by both application-level validation and an appropriate data constraint. Releases are more predictable, and security maintenance is visible rather than postponed. Technical debt has not disappeared, but it is recorded, prioritised, and reduced as part of normal product development.

Learning points

The case demonstrates that engineering quality is not a separate phase after Scrum delivery. A reliable increment depends on technical practices, product decisions, operational preparation, and security governance. Automation is valuable only when the team maintains it and responds to its results. Finally, technical debt should be managed as a risk to product value, not hidden as an exclusively technical concern.

Challenges and Limitations

Agile engineering practices require investment. Automation can be expensive to establish, test environments can be difficult to reproduce, and pipelines can become complicated. Excessive process may slow a low-risk product, while insufficient control may expose a high-risk product. Teams should therefore calibrate controls to risk and learn from evidence.

Tests can provide false confidence if they cover only common paths. High coverage does not necessarily mean high quality; coverage measures exercised code, not the adequacy of scenarios or assertions. Security tools can miss novel attacks. Code review can fail when reviewers lack context. Continuous delivery can accelerate the delivery of defects if quality gates and monitoring are weak.

Management should avoid measuring teams solely by lines of code, test counts, or deployment frequency. Useful evidence includes escaped defects, change failure patterns, recovery time, lead time, vulnerability age, build reliability, and user outcomes. Metrics should support learning rather than encourage gaming.

Best-Practice Checklist

  • Define quality in the Definition of Done.
  • Integrate small changes frequently.
  • Keep the main branch releasable.
  • Automate fast, high-value checks first.
  • Maintain tests as carefully as production code.
  • Record and prioritise technical debt.
  • Refactor near the areas being changed.
  • Store secrets outside source code.
  • Scan and update dependencies.
  • Treat security, privacy, accessibility, and operability as product concerns.
  • Make deployments repeatable and observable.
  • Use staged release controls when risk warrants them.
  • Review pipeline failures promptly.
  • Use AI assistance only with appropriate human review and governance.

Chapter Summary

Agile engineering turns an increment from merely coded functionality into a potentially releasable product outcome. Technical debt represents future cost and risk; it should be made visible and managed deliberately. Refactoring improves internal design while preserving observable behaviour, especially when supported by automated tests. A balanced test strategy combines unit, integration, end-to-end, exploratory, security, and acceptance testing according to risk.

Version control, code review, and frequent integration provide collaboration and traceability. Continuous integration supplies rapid feedback, while continuous delivery keeps software ready for release and continuous deployment automates production release when appropriate. Secure development embeds threat awareness, access control, dependency management, privacy, and monitoring throughout the lifecycle. These practices should be reflected in the Definition of Done so that Scrum teams produce increments that are functional, maintainable, secure, observable, and operationally releasable.

Key Terms

Technical debt: Future cost or risk created by a short-term or inherited technical compromise.

Refactoring: Restructuring code without changing its externally observable behaviour.

Automated test: A repeatable programmatic check of expected software behaviour.

Unit test: A test of a small software component, usually in isolation.

Integration test: A test of interactions between components or external systems.

End-to-end test: A test of a complete user journey through a deployed system.

Test debt: Problems in the test suite that make tests unreliable, slow, or difficult to maintain.

Version control: A system for recording, comparing, and managing changes to files.

Commit: A recorded, coherent change in a version-control repository.

Code review: Examination of a proposed change by other qualified team members.

Continuous integration: Frequent integration of changes with automated validation.

Continuous delivery: Maintaining software in a state that can be released reliably.

Continuous deployment: Automatically releasing validated changes to production.

Pipeline: An automated sequence of build, test, security, deployment, and release activities.

Feature flag: Configuration that controls whether functionality is available to users.

Definition of Done: Shared criteria that determine when an increment is complete.

Threat modelling: Structured identification and analysis of security threats and mitigations.

Least privilege: Giving users and systems only the access necessary for their tasks.

Observability: The ability to understand system behaviour through outputs such as logs, metrics, and traces.

Releasable increment: A completed product addition that satisfies quality and release conditions.

Review Questions

Short Answer Questions

  1. What is technical debt, and why should it be made visible?
  2. How does refactoring differ from rewriting?
  3. What is the primary purpose of continuous integration?
  4. Distinguish continuous delivery from continuous deployment.
  5. Why should secrets not be stored in a source-code repository?

Long Answer Questions

  1. Explain how automated testing at several levels supports the production of releasable increments.
  2. Discuss the relationship between version control, code review, and technical debt management.
  3. Describe how a Scrum team could incorporate secure development into its Definition of Done.
  4. Compare the benefits and limitations of continuous delivery and manual release approval.
  5. Explain why quality is a shared responsibility rather than a final testing activity.

Analytical / Application Questions

  1. A team has fast unit tests but frequent production failures caused by integration problems. Analyse the likely weaknesses in its test and delivery strategy and recommend improvements.
  2. A Product Owner requests a feature urgently, while developers identify a serious authentication weakness in the affected module. How should the team and Product Owner assess and prioritise the competing work?
  3. Design a practical Definition of Done for a low-risk web application that includes functional quality, testing, security, version control, and deployability requirements.

Multiple Choice Questions with Answers

Question 1

Which statement best describes technical debt?

A. Any defect found after a release

B. Future cost created by a current or inherited technical compromise

C. The financial price of purchasing development tools

D. The number of unfinished Product Backlog items

Correct Answer: B. Future cost created by a current or inherited technical compromise

Question 2

What is the defining characteristic of refactoring?

A. It replaces the entire system

B. It changes observable behaviour without testing

C. It restructures code while preserving externally observable behaviour

D. It removes the need for code review

Correct Answer: C. It restructures code while preserving externally observable behaviour

Question 3

Which test level normally focuses on a small component in isolation?

A. Unit test

B. End-to-end test

C. Acceptance review

D. Production canary test

Correct Answer: A. Unit test

Question 4

What is the main purpose of continuous integration?

A. To prevent all changes from reaching the main branch

B. To integrate changes frequently and validate them automatically

C. To replace version control

D. To release every change directly to users

Correct Answer: B. To integrate changes frequently and validate them automatically

Question 5

Which statement correctly distinguishes continuous delivery from continuous deployment?

A. Delivery keeps software releasable; deployment automatically releases validated changes

B. Delivery applies only to documentation; deployment applies to code

C. Delivery is manual testing; deployment is code review

D. There is no meaningful distinction

Correct Answer: A. Delivery keeps software releasable; deployment automatically releases validated changes

Question 6

Which practice is most appropriate for protecting passwords and private keys?

A. Commit them to a private source repository

B. Place them in comments in the application code

C. Store them in an approved secrets-management system

D. Encode them with a reversible text transformation

Correct Answer: C. Store them in an approved secrets-management system

Question 7

What does a Definition of Done primarily provide?

A. A shared quality standard for completing an increment

B. A list of individual employee targets

C. A replacement for Product Backlog ordering

D. A guarantee that no future defects can occur

Correct Answer: A. A shared quality standard for completing an increment

Question 8

Why are small, frequent commits useful?

A. They eliminate the need for automated testing

B. They make changes easier to review, integrate, and potentially revert

C. They ensure every feature is complete in one commit

D. They prevent all merge conflicts

Correct Answer: B. They make changes easier to review, integrate, and potentially revert

Question 9

Which security principle gives a user or system only the access required for its task?

A. Defence by obscurity

B. Least privilege

C. Maximum availability

D. Open authentication

Correct Answer: B. Least privilege

Question 10

Which statement about test coverage is most accurate?

A. High coverage proves that software has no defects

B. Coverage measures exercised code but does not by itself prove adequate scenarios

C. Coverage makes exploratory testing unnecessary

D. Coverage is meaningful only for end-to-end tests

Correct Answer: B. Coverage measures exercised code but does not by itself prove adequate scenarios

Agile & Scrum Management
Chapter 10 of 15