DOI: 10.1201/9781003129509-8

Introduction to Agile Methodologies 1

Agile methodologies comprise a family of nontraditional software development strategies that have captured the imagination of many who are leery of traditional, process-laden (plan-driven) approaches. Agile methodologies are characterized by their lack of rigid process, though this fact does not mean that agile methodologies, when correctly employed, are not rigorous nor suitable for industrial applications—they are. What is characteristically missing from agile approaches, however, are “cook-book” solutions that focus on mandatory meetings and complex documentation-prescribed development approaches.

Agile methodologies apply to software engineering. While there are elements of agile methodologies that can be applied to the engineering of systems (in particular, the human considerations), such methodologies are usually described as lightweight or lean when applied to non-software systems. This is so because agile methodologies depend on a series of rapid, non-throwaway prototypes, an approach that is not usually practical in hardware-based systems. In any case, the non-software engineer can still benefit from this chapter because agile methodologies are increasingly being employed and because the mindset of the agile software engineer includes some healthy perspectives.

In order to fully understand the nature of agile methodologies, we need to examine a document called the Agile Manifesto and the principles behind it. The Agile Manifesto was introduced by a number of leading proponents of agile methodologies to explain their philosophy (see Figure 8.1 ).

Figure 8.1 Manifesto for agile software development. (From Beck, K., Extreme Programming Explained: Embrace Change , Longman Higher Education, London, 2000.)

Signatories to the Agile Manifesto include many luminaries of modern software engineering practice such as Kent Beck, Mike Beedle, Alistair Cockburn, Ward Cunningham, Martin Fowler, Jim Highsmith, Ron Jeffries, Brian Marick, Robert Martin, Steve Mellor, and Ken Schwaber . Underlying the Agile Manifesto is a set of principles. Look at the principles below, noting the emphasis on those aspects that focus on requirements engineering, which we set in italics.

Principles Behind the Agile Manifesto

  • At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.
  • Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
  • Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage.
  • Deliver working software frequently, from a couple of weeks to a couple of months, with a preference for the shorter timescale.
  • Business people and developers must work together daily throughout the project.
  • Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.
  • The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.
  • Working software is the primary measure of progress.
  • Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.
  • Continuous attention to technical excellence and good design enhances agility.
  • Simplicity—the art of maximizing the amount of work not done—is essential. “Do the simplest thing that could possibly work.”
  • The best architectures, requirements, and designs emerge from self-organizing teams ( Beck 2000 ).

Notice how the principles acknowledge and embrace the notion that requirements change throughout the process. Also, the agile principles emphasize frequent, personal communication (this feature is beneficial in the engineering of non-software systems too). The highlighted features of requirements engineering in agile process models differ from the “traditional” waterfall and more modern models such as iterative, evolutionary, or spiral development. These other models favor a great deal of preliminary work on the requirements engineering process and the production of, often, voluminous requirements specifications documents.

Benefits of Agile Software Development

Agile software development methods are a subset of iterative methods 2 that focus on embracing change and emphasize collaboration and early product delivery while maintaining quality. Working code is considered the true artifact of the development process. Models, plans, and documentation are important and have their value but exist only to support the development of working software, in contrast with the other approaches already discussed. However, this does not mean that an agile development approach is a free-for-all. There are very clear practices and principles that agile methodologists must embrace.

  • Agile methods are adaptive rather than predictive. This approach differs significantly from process models (e.g., waterfall) that emphasize planning the software in great detail over a long period of time, and for which significant changes in the software requirements specification can be problematic. Agile methods are a response to the common problem of constantly changing requirements that can bog down the more “ceremonial” up-front design approaches, which focus heavily on documentation at the start.
  • While testing is testing phase is a separate phase and follows a build phase in process models, testing is completed each programming in agile development. What this implies is that users in an agile environment can frequently use the newly developed components to validate the financial value of the software. After the users know the financial value of each iteration, they can make better decisions about the software’s future.
  • Agile methods are also adaptive rather than predictive. This approach differs significantly from process models that emphasize planning the software in great detail over a long period of time, and for which significant changes in the software requirements specification can be problematic. Agile methods are a response to the common problem of constantly changing requirements that can bog down the more “ceremonial” up-front design approaches, which focus heavily on documentation at the start.
  • Agile methods are also people-oriented rather than process-oriented. This means they explicitly make a point of trying to make development “fun.” Presumably, this is because writing software requirements specifications and software design descriptions is onerous and, hence, to be minimized.

Agile methodologies include Crystal, Extreme Programming, Scrum, Kanban, Lean, Dynamic systems development method (DSDM), feature-driven development, and adaptive programming, and there are others. We will look more closely at four of the most widely used agile methodologies: XP, Scrum, Kanban, and Lean.

Extreme Programming

Extreme programming (XP) is one of the most widely used agile methodologies. XP is traditionally targeted toward smaller development teams and requires relatively few detailed artifacts. XP takes an iterative approach to its development cycles. We can visualize the difference in process between a traditional waterfall model, iterative models, and XP ( Figure 8.2 ). Whereas an evolutionary or iterative method may still have distinct requirements analysis, design, implementation, and testing phases similar to the waterfall method, XP treats these activities as being interrelated and continuous.

Figure 8.2 Comparison of waterfall, iterative, and XP development cycles. (From Beck, K., Extreme Programming Explained: Embrace Change , Longman Higher Education, London, 2000.)

XP promotes a set of 12 core practices that help developers to respond to and embrace inevitable change. The practices can be grouped according to four practice areas:

  • Planning
  • Coding
  • Designing
  • Testing

Some of the distinctive planning features of XP include holding daily stand-up meetings, making frequent small releases, and moving people through different project roles. Coding practices include having the customer constantly available, coding the unit test cases first, and employing pair-programming (a unique coding strategy where two developers work on the same code together).

Design practices include looking for the simplest solutions first, avoiding too much planning for future growth (speculative generality), and refactoring the code (improving its structure) continuously.

Testing practices include creating new test cases whenever a bug is found and having unit tests for all code, possibly using such frameworks as XUnit.

While removal of the territorial ownership of any code unit is another feature of XP, this framework may not work in the best way possible if all team members are not collocated.

Scrum

Scrum, which is named after a particularly contentious point in a rugby match, enables self-organizing teams by encouraging verbal communication across all team members and across all stakeholders. A fundamental principle of Scrum is that traditional, plan-driven software development methodologies such as waterfall and iterative development focus too much on process and not enough on software. Moreover, while plan-driven development focuses on non-software artifacts (e.g., documentation) and processes (e.g., formal reviews), Scrum emphasizes the importance of producing functioning software early and often. Scrum promotes self-organization by fostering high-quality communication between all stakeholders. In this case, it is implicit that the problem cannot be fully understood or defined (it may be a wicked problem). And the focus in Scrum is on maximizing the team’s ability to respond in an agile manner to emerging challenges.

Scrum features a “living” (constantly changing) backlog of prioritized work to be completed. Completion of a largely fixed set of backlog items occurs in a series of short (approximately 30 days) iterations or sprints. Each day, a brief (e.g., 15-minutes) meeting or Scrum is held in which progress is explained, upcoming work is described, and impediments are raised. A short planning session occurs at the start of each sprint to define the backlog items to be completed. A brief postmortem or heartbeat retrospective review occurs at the end of the sprint ( Figure 8.3 ).

Figure 8.3 The Scrum development process from Boehm and Turner (2003). (Adapted from Schwaber, K., & Beedle, M., Agile Software Development with SCRUM , Prentice Hall, Upper Saddle River, NJ, 2001.)

A Scrum Master removes obstacles or impediments to each sprint. The Scrum Master is not the leader of the team (as they are self-organizing) but acts as a productivity buffer between the team and any destabilizing influences. In some organizations, the role of the Scrum Master can cause confusion. For example, if two members of a Scrum team are not working well together, it might be expected by a senior manager that the Scrum Master fix the problem. Fixing team dysfunction is not the role of the Scrum Master. Personnel problems need to be resolved by the line managers to which the involved parties report. This scenario illustrates the need for institution-wide education about agile methodologies when such approaches are going to be employed.

Kanban

The term “Kanban” is of Japanese origin, and its meaning is linked to the concept, “just-in-time.” The underlying Kanban method originated in lean manufacturing (presented next) and focuses on visualizing the progress of the work items, from start to finish (usually through a Kanban board that can be physical or digital ( Figure 8.4 )). Having the work progress visualized allows team members to see the state of every piece of work at any time.

Figure 8.4 Example of Kanban Board.

Kanban teams write the work items onto cards, usually one item per card. The cards are placed on the board, which is typically divided into columns, that show each flow of the software production (e.g., In Progress, In Testing, Completed, etc.). As the development evolves, the cards contained on the board are moved to the proper column that represents its status, and when a new task comes into play, a new “card” is created. Work moves around the board as capacity permits, rather than being pushed into the process when requested.

The Kanban method requires transparency and real-time communication so that the members of a team can know exactly at what stage the development is and can see the status of the project at any time. Kanban has been effectively used to develop large software and software-intensive systems.

Lean Development

Lean Development encompasses hardware, software, and hybrid systems. “Lean Software Development” is borrowed from “Lean Manufacturing,” which is a set of seven principles adapted from the Toyota Production System. The seven principles are:

  • Eliminate Waste : everything that does not bring effective value to the customer’s project shall be deleted;
  • Build Quality In : creating quality in development requires discipline and control of the quantity of residuals created;
  • Deliver Fast : deliver value to the customer as soon as possible;
  • Defer Commitments : encouraging the team not to focus too much on planning and anticipating ideas without having a prior and comprehensive understanding of the requirements of the business;
  • Optimize the Whole : the development sequence has to be perfected enough to be able to delete errors in the code, in order to create a flow of true value;
  • Respect People : communicating and managing conflicts are two essential points
  • Creating Knowledge : the team is motivated to document the whole infrastructure to later retain that value.

Applying these principles in software and systems development allows the team to decrease the time needed to deliver functionalities since the principles prepare the development team in the decision-making process, hence increasing general motivation, while deleting superfluous activity, therefore saving time and money. Besides, these principles are easily scalable methodology and easily adaptable to projects of any dimension.

Requirements Engineering for Agile Methodologies

The increasing adoption of Agile practices in software development has been on the radar of the Requirements Engineering (RE) community in recent years ( Wagner et al. 2018 ). This is mainly because “doing requirements” consumes time that could be rather spent on writing code, and business stakeholders in an agile environment often feel better if they think that the development team is “working” (that is, coding) on their problems ( Orr 2004 ).

While many conventional RE practices are important also in agile projects, as Savolainen et al. ( 2010 ) observe, there are some major differences as well.

Paetsch et al. ( 2003 ) analyzed commonalities and differences between traditional RE approaches and agile software development. Their findings include that one of the differences is related to customers involvement. Customers are constantly involved in requirements discovery and refinement in agile methods. All systems developers should be involved in the requirements engineering activity, and each can, and should, have regular interaction with customers. In traditional approaches, the customer has less involvement once the requirements specification has been written and approved, and typically, the involvement is often not with the systems developers.

Another difference is in the timing of the requirements engineering activities. In traditional systems and software engineering, requirements are gathered, analyzed, refined, etc. at the front end of the process. In agile methods, requirements engineering is an ongoing activity; that is, requirements are refined and discovered with each system build. Even in spiral methodologies, where prototyping is used for requirements refinement, requirements engineering occurs much less so late in the development process.

A third noted difference in the agile approach to requirements engineering is much more invulnerable to changes throughout the process (remember, “embrace change”) than in traditional software engineering.

The same findings were confirmed in a study by Ramesh et al. ( 2010 ) who examined how RE had been conducted in 16 organizations that were involved in agile software development.

Bose et al. ( 2008 ) suggested that while following agile practices may be effective in acquiring continuous feedback from customers, the limits of these practices on RE are not well defined. They recommended that proper requirements management should be adopted under the agile umbrella to ensure proper traceability when the requirements are likely to be changed. The verification of early requirements representations was also proposed.

Cao and Ramesh ( 2008 ) studied 16 software development organizations that were using either XP or Scrum (or both) and uncovered seven requirements engineering practices that were agile in nature.

  1. Face-to-face communications (overwritten specifications)
  2. Iterative requirements engineering
  3. Extreme prioritization (ongoing prioritization rather than once at the start, and prioritization is based primarily on business value)
  4. Constant planning
  5. Prototyping
  6. Test-driven development
  7. Reviews and tests

Some of these practices can be found in non-agile development (e.g., test-driven development and prototyping), but these seven practices were consistent across all of the organizations studied.

As opposed to the fundamental software requirements specification, the fundamental artifact in agile methods is a stack of constantly evolving and refining requirements. These requirements are generally in the form of user stories. In any case, these requirements are generated by the customer and prioritized—the higher the level of detail in the requirement, the higher the priority. As new requirements are discovered, they are added to the stack and the stack is reshuffled in order to preserve prioritization.

There are no proscriptions on adding, changing, or removing requirements from the list at any time (which gives the customer tremendous freedom). Of course, once the system is built, or likely while is it is being built, the stack of user stories can be converted to a conventional software requirements specification for system maintenance and other conventional purposes.

Yat et al. conducted a systematic review of studies of agile software projects published between 2002 and 2012. They identified five traditional requirements engineering challenges that were either eradicated or minimized by the requirements engineering practices found in agile methodologies. These challenges were:

  • Bridging the communication gap with all stakeholders
  • Increasing customer involvement
  • Reducing the size and complexity of documentation
  • Reducing scope creep
  • Achieving requirements validation ( Inayat et al. 2015a )

They noted that more research and empirical evidence were needed to strengthen and generalize these conclusions, but the results of their study still strongly point to the power of agile methods.

Ambler ( 2007 ) suggests the following best practices for requirements engineering using agile methods. Many of the practices follow directly from the principles behind the Agile Manifesto:

  • Have active stakeholder participation
  • Use inclusive (stakeholder) models
  • Take a breadth-first approach
  • Model “storm” details (highly volatile requirements) just in time
  • Implement requirements, do not document them
  • Create platform-independent requirements to a point
  • Remember that smaller is better
  • Question traceability
  • Explain the techniques
  • Adopt stakeholder terminology
  • Keep it fun
  • Obtain management support
  • Turn stakeholders into developers
  • Treat requirements like a prioritized stack
  • Have frequent, personal interaction
  • Make frequent delivery of software
  • Express requirements as features

Ambler also suggests using such artifacts as CRCs, acceptance tests, business rule definitions, change cases, data flow diagrams, user interfaces, use cases, prototypes, features and scenarios, use cases diagrams, and user stories to model requirements ( Ambler 2007 ). These elements can be added to the software requirements specification document along with the user stories.

For requirements elicitation, he suggests using interviews (both in-person and electronic), focus groups, JAD, legacy code analysis, ethnographic observation, domain analysis, and having the customer on-site at all times ( Ambler 2007 ).

Finally, a systematic literature review on agile requirements engineering practices and challenges (Inayat and Daneva 2015b) identified 17 RE practices that we found to be adopted in agile software development:

  • Face-to-face communication between team members and client representatives is a characteristic of agile RE.
  • Customer involvement and interaction were declared the primary reasons for project success and limited failure.
  • User stories are created as specifications of the customer requirements. User stories facilitate communication and better overall understanding among stakeholders.
  • Iterative requirements, requirements unlike in traditional software development methods, emerge over time in agile methods.
  • Requirement prioritization is part of each iteration in agile methods.
  • Change management has proven to be a significant challenge for traditional approaches thus far.
  • Cross-functional teams include members from different functional groups who have similar goals.
  • Prototyping is perceived as a straightforward way to review requirements specifications with clients and to gain timely feedback before moving to subsequent iterations.
  • Testing before coding means writing tests prior to writing functional codes for requirements.
  • Requirements modeling is performed in agile software development methods, but it is different from RE models developed in traditional software development methods.
  • Requirements management is performed by maintaining product backlog/feature lists and index cards.
  • Review meetings and acceptance tests are the developed requirements and product backlogs that are constantly reviewed in meetings.
  • Code refactoring is meant to revisit and modify developed code structure, improve on the structure, and accommodate changes.
  • Shared conceptualization is a supporting concept to carry out RE activities related to gathering, clarifying, and evolving for agile methods.
  • Pairing for requirements analysis is a practice that encourages the stakeholders to perform multiple roles as well.
  • Retrospectives are the meetings held after the completion of an iteration.
  • Continuous planning is a routine task for agile teams.

VIGNETTE 8.1 DevOps and SAFe

DevOps, a mashup of the words “development” and “operations,” is “a set of practices intended to reduce the time between committing a change to a system and the change being placed into normal production, while ensuring high quality” ( Bass et al. 2015 ). Concepts leading to DevOps far predate its origin, but it began to appear in industry around 2007/2008. DevOps practices involve four main concerns:

  • Getting changes quickly into production.
  • Using automated testing to find errors.
  • Reducing or eliminating errors occurring during deployment.
  • Finding and repairing system faults quickly

Since it is well known that the cost of fixing requirements errors late in the development process is much higher than finding them early in the process, addressing the DevOps concerns suggests that a strong RE program is needed. For example, ensuring that an effective means for capturing NFRs is in place as these are particularly difficult to address late in the process.

Scaled Agile Framework (SAFe) begin to emerge around the same time as DevOps as an agile style of development that incorporates elements of lean-agile, systems thinking, DevOps, and more. SAFe is also based on principles that predate its origin significantly. One of the major differences between SAFe, however, and other agile development methodologies is that SAFe is designed to scale up to much larger teams and projects.

Like the Agile Manifesto, SAFe is based on ten principles which include taking a systems thinking and value-based approach to managing project requirements with iterative build out of functionality in working non-throwaway prototypes (also found in DevOps). SAFe also adopts other principles from Agile development such as sustainable pace, shared ownership, and keeping participants motivated in the process (though these terms are not precisely used).

SAFe defines several requirements types that capture functionality from high level to lower level, conceptional, and NFRs. The intention of these types is to allow for a greater level of generality early in the development process with idiosyncratic requirements not being defined until later in the project. SAFe is itself adaptive; for example, it can work with many of the requirements representations and practices previously described such as User Stories, Use Cases, Scrum, XP, and Kanban.

Technical Debt

Technical debt is a metaphor referring to the eventual consequences of poor system architecture and system development within a codebase ( Cunningham 1992 ). The debt can be thought of as work that needs to be done before a particular job can be considered complete. In agile development, the technical debt can be thought of as the amount of work that is left to be done from previous iterations (sprints), when a new iteration starts. The buildup of technical debt is the main reason for projects to miss deadlines. As with monetary debt, the cost of never paying down a technical debt may accumulate an “interest” making it harder to implement changes. The debt can be paid off by simply completing the uncompleted work.

Rubin uses the following status categories to classify technical debts:

  • Known technical debt: that is made visible to the system development team.
  • Happened-upon technical debt—that the development team was not familiar with its existence until it was exposed during development. For example, the team is implementing a new feature to the product and in doing so it realizes that some work was left incomplete for a while by someone who has long since departed.
  • Targeted technical debt—debt that is known and has been targeted for servicing by the development team.

The technical debt can be unavoidable. The survey from ( Kassab et al. 2014 ) shows that for the agile development projects on average 91% of these projects reported carrying some level of technical debt when moving from iteration to the next, but most of the projects (84%) reported that this level is below 25% on average. So when a new iteration or sprint starts, there was on average 25% of a work still to be completed from previous iterations or sprints. Common causes for the technical debt that are directly relevant to requirements include:

  • Insufficient up-front “metaphor” definition. In this situation, design and coding tasks may start while the core requirements are still being refined. While this was may have been done to save time, often the design and the code will have to be reworked later.
  • Business constraints, where the business stakeholders requesting something released sooner before all required changes are complete. Those uncompleted changes form a technical debt.
  • Lack of alignment to standards. If early in the project, the regulations, standards, and guidelines are ignored, technical debt will be formed to eventually integrate what has been developed with what has been missed.
  • Lack of a development process, where the business is blind to the concept of technical debt.
  • Tightly coupled requirements, where the majority of requirements refer or depend on others. In this situation, the system will not be flexible enough to adapt to changes in business needs.
  • Parallel development on multiple requirements without proper coordination accrues technical debt because of the work required to merge these developments into a single base.
  • Last-minute requirements specification changes have the potential to percolate throughout a project but no time or budget to see them through with documentation.

Example Application of Agile Software Development

Consider the pet store point of sale (POS) system. Suppose that we wanted to use an agile software development methodology, specifically Scrum, to develop this system. Let’s look at what the requirements engineering process might look like.

Suppose that we had a five-person development team, including the Scrum Master. For simplicity, let’s assume that the only stakeholders are the pet store owner (who is really the customer, since he is paying for the system), store customers, cashiers, and accountants. We will select class representatives for the store customers, cashiers, and accountants. Collectively, let’s call them the “stakeholder panel.” Now consider the following activities.

  1. The Scrum Master organizes a set of meetings between the development team and the customer (the store owner) to get a basic understanding of the system requirements, constraints, and ground rules. Based on these discussions, the Scrum Master organizes a set of additional elicitation activities, possibly including structured interviews, card sorting, and focus groups with the other stakeholders. A QFD study is used as a validation activity (since there are likely many other POS systems that can be compared). The goal of these activities is to produce a set of prioritized user stories (let’s say around 100), including effort estimates for each. But the customer has told us that he wants a “cutting edge” system, so we know that as the system goes through development, the customer and other stakeholders are going to want new or different functionality.
  2. The development team analyzes the user stories and selects a subset of these; let’s say 10, for the first sprint. These 10 would be the most “user-facing” stories, leaving as much backend processing for later as possible.
  3. The development team consults with the stakeholders again to get further clarity for these 10 user stories before beginning development.
  4. Each day starts with a scrum. Developers use test-driven design to organically derive the system design as well as unit test cases. The Scrum Master facilitates communications between the development team and the various stakeholders so that stakeholder-facing questions can be answered quickly. After approximately 30 days, the first sprint is completed.
  5. The stakeholder panel is presented with the system built during the sprint for feedback. This feedback will include changes to the current system increment, new features to be added, and possibly, features to be omitted.
  6. Based on this feedback, the development team creates new user stories and adds them to the backlog, modifies other user stories as needed, and reshuffles the backlog.
  7. The development team selects a new set of user stories (say 10) from the backlog for the next 30-day sprint, and process steps (C–F) are repeated until the backlog is exhausted.

Additional acceptance testing may be conducted, depending on the terms of the contract with the customer. This testing would be based on a set of criteria developed during the contract negotiation. Such acceptance testing based on a requirements specification is usual for conventional development but atypical for agile development.

There were 100 user stories originally, but even if we schedule 10 user stories per sprint (month), the total development time is likely to be longer than 10 months. This is because new user stories are being added, and old ones are being changed.

Of course, the Scrum Master is tracking the project velocity during each sprint in order to refine his project completion estimates.

When Is Agile Recommended?

The use of agile software methodologies is becoming very popular in the industry, at least as evidenced by survey data. For example, in a Forrester/Dr. Dobbs developer survey, 35% of respondents reported using some kind of agile methodology ( West et al. 2010 ). More recently, a 2020 survey on requirements engineering state of practices ( Kassab and Laplante 2022 ) found that 70% of software engineers surveyed used an agile methodology as Software Development Life Cycle for their project making agile the most popular SDLC ( Figure 8.5 ). The usage of agile is almost increased by more than 24% since 2013 when a similar survey was conducted (Kassab’ 2014). The 2020 survey also found that agile methods were used more frequently than waterfall style development in every industry ( Figure 8.6 ), and it observed a shift in the “finance /banking/ insurance,” “defense,” and “aerospace” domains from 2013 when the waterfall was more popular than agile back then.

Figure 8.5 Software Development lifecycle employed ( n  = 91).

Figure 8.6 Software Development lifecycle employed across business domains.

But the question arises, when should agile development methodologies be used?

Boehm and Turner suggest that the way to answer the question is to look at the project along a continuum of five dimensions: size (in terms of the number of personnel involved), system criticality, personnel skill level, dynamism (anticipated number of system changes over some time interval), and organizational culture (whether the organization thrives on chaos or order) (Boehm and Turner 2003). In Figure 8.7 , as project characteristics tend away from the center of the diagram, then the likelihood of succeeding using agile methodologies decreases.

Figure 8.7 Balancing agility and discipline. (Adapted from Boehm and Turner (2003).)

Therefore, projects assessed in the innermost circle are likely candidates for agile approaches, those in the second circle (but not in the inner circle) are marginal, and those outside of the second circle are not good candidates for agile approaches.

Requirements Engineering in XP

Requirements engineering in XP follows the model shown in Figure 8.8 where the stack of requirements in Ambler’s model refers to user stories. And in XP, user stories are managed and implemented as code via the “planning game.”

Figure 8.8 Agile requirements change management process. (Adapted from Ambler, S., http://www.agilemodeling.com/essays/agileRequirements.htm , 2007.)

The planning game in XP takes two forms: release and iteration planning. Release planning takes place after an initial set of user stories has been written. This set of stories is used to develop the overall project plan and plan for iterations. The set is also used to decide the approximate schedule for each user story and overall project.

Iteration planning is a period of time in which a set of user stories and fixes to failed tests from previous iterations are implemented. Each iteration is 1–3 weeks in duration. Tracking the rate of implementation of user stories from previous iterations (which is called project velocity) helps to refine the development schedule.

Because requirements are constantly evolving during these processes, XP creator Kent Beck says that “in XP, requirements are a dialog, not a document” ( Beck et al. 2001 ) although it is typical to convert the stack of user stories into a software requirements specification.

Requirements Engineering in Scrum

In Scrum, the requirements stack shown in the model of Figure 8.8 is, as in XP, the evolving backlog of user stories. And as in XP, these requirements are frozen at each iteration for development stability. In Scrum, each iteration takes about a month. To manage the changes in the stack, one person is given final authority for requirement prioritization (usually the product sponsor).

In Scrum, the requirements backlog is organized into three types: product, release, and sprint. The product backlog contains the release backlogs, and each release contains the sprint backlog. Figure 8.9 is a Venn diagram showing the containment relationship of the backlog items.

Figure 8.9 Backlog relationship between product, releases, and sprints.

The product backlog acts as a repository for requirements targeted for release at some point. The requirements in the product backlog include low-, medium-, and high-level requirements.

The release backlog is a prioritized set of items drawn from the product backlog. The requirements in the release backlog may evolve so that they contain more details and low-level estimates.

Finally, the sprint backlog list is a set of release requirements that the team will complete (fully coded, tested, and documented) at the end of the sprint. These requirements have evolved to a very high level of detail, and hence, their priority is high.

Scrum has been adopted in several major corporations, with notable success. Some of the authors’ students also use Scrum in courses. In these cases, it proves highly effective when there is little time for long requirements discovery processes.

Gathering User Stories

User stories are a common unit of requirements in most agile methodologies. Each user story represents a feature desired by the customer. User stories gathering goes on throughout the project because user requirements keep on evolving throughout the project. Initial user stories are usually gathered in small offsite meetings. Stories can be generated either through goal-oriented (e.g., “let’s discuss how a customer makes a purchase”) approaches or through interactive (stream-of-consciousness) approaches. Developing user stories is an “iterative and interactive” process. Formal requirements, use cases, and other artifacts are derived from the user stories by the software engineering team as needed.

Writing User Stories

User stories (a term coined by Beck) are written by the customer on index cards, though the process can be automated via wikis or other tools ( Beck 2000 ).

A user story consists of the following components:

  • Title : this is a short handle for the story. A present tense verb in active voice is desirable in the title.
  • Acceptance Test : this is a unique identifier that will be the name of a method to test the story.
  • Priority : this is based on the prioritization scheme adopted. Priority can be assigned based on “traditional” prioritization of importance or on the level of detail (higher priority is assigned to higher detail).
  • Story Points : this is the estimated time to implement the user story. This aspect makes user stories helpful for effort and cost estimation.
  • Description : this is one to three sentences describing the story.

A sample layout for these elements on an index card is shown in Table 8.1 .

Table 8.1 User Story Layout
Title
Acceptance TestPriorityStory Points
Description

An example user story for a customer returning items in the pet store POS system is shown in Table 8.2 .

Table 8.2 User Story: Pet Store POS System
Title: Customer Returns Items
Acceptance Test: custRetItemPriority: 1Story Points: 2
When a customer returns an item, its purchase should be authenticated. If the purchase was authentic, then the customer’s account should be credited or the purchase amount returned. The inventory should be updated accordingly.

User stories should be understandable to the customers and each story should add value.

Developers do not write user stories, but users do. But stories need to be small enough that several can be completed per iteration. Stories should be independent (as much as possible); that is, a story should not refer back and forth to other stories. Finally, stories must be testablelike any requirement, if it cannot be tested, it’s not a requirement. The testability of each story is considered by the development team. Table 8.3 depicts another example user story describing a security threat detection in the airport baggage handling system.

Table 8.3 User Story: Baggage Handling
Title: Detect Security Threat
Acceptance Test: detSecThrtPriority: 1Story Points: 3
When a scanned bag has been determined to contain an instance of a banned item, the bag shall be diverted to the security checkpoint conveyor. The security manager shall be sent an email stating that a potential threat has been detected.

Estimating User Stories

To measure the user stories, agile teams allocate story points—arbitrary values to measure the effort required to complete that user story. These points can be allocated in many ways based on the team’s preferences. In most cases, project managers define a story point complexity range as a Fibonacci series (for example, 1, 2, 3, 5, 8). Another way is to pick a small reference story and estimate the other ones regarding that using the Delphi estimation technique known as “planning poker.” The stories are rated and reviewed before entering the next phase of prioritization.

Prioritizing User Stories

User stories are prioritized before iteration. The user stories are prioritized in terms of ranking (i.e., ordered as first, second, and third) and also as a group (e.g., “high priority,” “low,” and “medium”). The high-priority user stories are recorded in the product backlog and used as a guide to carry out the development work. Customers perform the prioritization task based on their understanding of the business value the user stories will bring using various techniques.

User Stories vs. Use Cases

It is worth noting that there is a significant difference between use cases and user stories. User stories come from the customer perspective and are simple and avoid implementation details. Use cases are more complex and may include implementation details (e.g., fabricated objects). Customers don’t usually write use cases (and if they do, beware, because now the customer is engaging in “software engineering”). Finally, it’s hard to say what the equivalence is for the number of use cases per user story. One user story could equal one or more than 20 use cases.

For example, for the customer return user story in Table 8.2 , you can imagine that it will take many more use cases to deal with the various situations that can arise in a customer return. In agile methodologies, user stories are much preferred to use cases. Appendix D includes a further discussion of user stories in both agile and non-agile settings.

Agile Requirements Engineering vs. Requirements Engineering in Agile

We need to make a distinction between requirements engineering for agile methodologies and agile requirements engineering. Agile requirements engineering means, generally, any ad hoc requirements engineering approach purported to be more flexible than traditional requirements engineering. This definition is not to be confused with specific practices for requirements engineering in agile methodologies as we just discussed ( Sillitti and Succi 2006 ).

A number of agile requirements engineering approaches have been introduced in the past few years, many of them not much more than sloppy requirements engineering. But some of the recent work in this area has been good too. However, for any “legitimate” agile requirements engineering methodologies that you may encounter, most of the practices can be traced to the Agile Manifesto. For example, Vlaanderen et al. ( 2011 ) showed how certain requirements engineering practices from Scrum could also be for software product management (after delivery). In particular, they identified sprint cycles, backlog administration, daily meetings, and early and frequent collaboration as necessary practices.

Story-Test-Driven Development

To illustrate an agile methodology, we describe one notable example. In this methodology called story-test-riven development (SDD), many of the usual customer-facing features of agile methodologies are incorporated along with short bursts of iterative development à la XP or Scrum. One difference in SDD, however, is that instead of the conventional user stories, customers write or review “story tests.” Story tests are nontechnical descriptions of behavior along with tests that verify that the behavior is correct. The story tests help “discover a lot of missing pieces or inconsistencies in a story” ( Mugridge 2008 ).

A nice feature of the story test is that it uses the Fit framework to allow users to build test cases into the stories in a tabular fashion (see Chapter 9 ). Hence, the users intuitively specify behavior and the tests for that behavior in the requirements.

For example, for a typical payroll system for a business (such as the pet store), a story test describing how to calculate ordinary and overtime pay for an employee based on various clocked hours is given in Figure 8.10 .

Figure 8.10 Using a story test to show how a company calculates pay for ordinary and overtime hours. (From Mugridge, R., Software , 25: 68–75, 2008.)

The table in Figure 8.10 shows, for instance, that if an employee works 5 consecutive 9-hour workdays, then they are considered to have 45 hours in ordinary and zero-hours in overtime pay due. If a worker clocks 10, 11, 12, 13, and 14-hour days in a week, then they are entitled to 45 hours of regular and 15 hours of overtime pay. But the Fit framework is an interactive specification—plugging in different values into the table that are incorrect will show up as invalid.

SDD development is considered to be complementary to test-driven development (TDD) in that the former is applied to overall system development ( Mugridge 2008 ).

Stay Updated : For the up-to-date data from the RE state of practice survey.

https://phil.laplante.io/requirements/updates/survey.php

State of Practice for Requirements Engineering in Agile Methodologies

In this section, we present different views from the 2020 survey on the requirements engineering state of practice ( Kassab and Laplante 2022 ) with a focus on how the state of practices for agile projects.

With respect to the requirements elicitation, the data revealed that “Brainstorming” was a common approach in both agile and waterfall projects.Bose et al. recommended that the projects using Agile “should learn from various elicitation techniques that have been in use in the conventional approaches as the Waterfall”. We indeed observe that in the “2020 Survey” use cases and interviews; originally popular techniques for the Waterfall model, are becoming common techniques in Agile projects as well, hence the increase in overall popularity. It is quite interesting to see the opposite also holds. That is, even though “user stories” were developed specifically for Agile, it is finding its way into projects that use “only Waterfall” (28% usage reported in these projects). Within the Agile projects sub-sample, “user stories” witnessed the biggest spike in overall usage (43% in 2020 from 14% in 2013).

Once the requirements are captured, the natural language was the dominant technique to express the requirements for both agile and waterfall projects. It is also of interest that formal specification techniques are still not commonly utilized in practice.

An interesting corollary to the formality discussion is the requirements review and inspection effort. The study found that the majority of respondents are performing requirements inspections. While 57% of Agile projects reported conducting inspection compared to 60% for the Waterfall, both approaches were close in their preferences for inspection techniques with “team reviews” taking first place and with automated requirements inspection using tools remaining largely unpopular.

On the requirements effort estimations, while 65% reported performing some requirements estimation activity, “Story Points” was the most popular technique reported. This is a shift from 2013 when “Expert Judgements” was the most popular back then. The majority of projects (87%) also reported consideration for Non-Functional Requirements (NFRs) during the effort estimation. This percentage was consistent among the Agile and Waterfall samples too. This was a particularly interesting finding considering the common belief that Agile approaches tend to deal less with NFRs in comparison to the Waterfall. One reason for this belief is that NFRs are not always apparent when the requirements are presented through user stories which is a common representation technique in Agile.

Overall, 49% of respondents reported that a tool was used to manage requirements. The usage of RE tools in Agile projects was 1.5 times more popular than in Waterfall projects. This was an interesting observation especially in the light of the common belief that Agile and RE tools may appear incompatible. While both involve the management of processes, their approaches differ in many ways. Agile promotes flexibility and rapid accommodation to change, whereas RE tools are based on tightly controlled processes that do not necessarily adapt well to changing business needs and requirements. The most-reported usage was for “confluence and Jira” (38%), followed by IBM Doors (18%), followed by MS office applications (13%).

Challenges for Requirements Engineering in Agile Methodologies

Of course, there are challenges in any new technology, and there are some in using agile methodologies, particularly concerning requirements engineering. Williams ( 2004 ) discusses some of these shortcomings.

For example, agile methodologies do not always deal well with nonfunctional requirements. Why should this be so? One reason is that they are not always apparent when dealing with requirements functionality only (through user stories).

Williams suggests dealing with this challenge by augmenting the user stories with appropriate nonfunctional requirements discovery techniques such as competitive analysis.

Another shortcoming is that with agile methodologies, customer interaction is strong—but mostly through prototyping. As we have seen, there are other ways to elicit nuanced requirements, and understanding stakeholder needs, for example, using various interviewing techniques would be desirable.

Furthermore, with agile methodologies, validation is strong through testing and prototyping, but verification is not so strong. Williams ( 2004 ) suggests that using formal methods could strengthen agile requirements engineering.

Rubin and Rubin ( 2011 ) identified documentation constructs that are often missed in agile software development, and they suggested ways to alleviate this problem. In particular, they noted that domain knowledge, and emergent system architecture and design, are not properly captured by traditional agile requirements practices. Their findings imply that agile requirements documents should be annotated with appropriate domain knowledge, and the corresponding agile architecture and design documents should be annotated with the final system architecture and design, respectively.

Requirements management is built into the process (e.g., XP and Scrum), but it is mostly focused on the code level. Williams suggests that requirements management could be strengthened by adding more standard configuration management practices.

Finally, Inayat et al. ( 2015b ) summarized a set of agile requirements engineering challenges. The challenges identified by Inayat et al. were as follows:

  • Minimal documentation is a vital challenge that agile methods pose to development teams.
  • Customer availability is assumed and advocated by agile methods.
  • Budget and schedule estimation is a challenge for organizations that follow agile methods.
  • Inappropriate architecture finalized by the team in earlier stages of the project becomes inadequate in later stages with new requirements.
  • Neglecting NFRs is where NRFs focus on system quality, including its internal quality, i.e. maintainability, testability and external quality usability, and security.
  • Customer inability and agreement are the two main issues apart from availability.
  • Contractual limitations and requirements volatility are important by not allowing changes in requirements after the signing of the contract; the changes can cause an increase in cost and sometimes failure of projects.
  • Requirements change and change evaluation is an important aspect of agile methods.

These challenges echoed some of those identified by others.

Even though there are still significant challenges in using agile methodologies for software engineering, there are also significant advantages. Therefore, agile software methodologies should at least be considered for most projects. And even when agile methodologies are not considered suitable for certain software projects, or when the project is not software, many of the practices discussed for agile methodologies could be used. For example, such practices as the customer always on-site focus on product over documentation, and early development of test cases should still be incorporated in almost every project.

VIGNETTE 8.2 Affordable Care Act Website

In 2010, the United States Congress passed the Affordable Care Act requiring all citizens to obtain some form of healthcare insurance. The law was a controversial one, and adding to the controversy was a disastrous rollout of the federal government’s associated website. The project was complex and involved 55 contractors. Rather than focusing on a robust development process, there was a rush to deploy the website, and, unsurprisingly, it suffered from many problems. There were many structural and security problems but usability issues such as frequent crashing, poor response times, missing or misleading content, and navigation difficulties received the most public attention ( Venkatesh et al. 2014 ). Around 9.47 million users attempted to register during the first week of deployment but only 271,000 succeeded ( Cleland-Huang 2014 ). Studies of the failed launch of the website cited a variety of root causes including project schedule underestimation, ill-defined scope, poor requirements specification, and inefficient risk analysis and management ( Anthopoulos et al. 2016 ).

While many experts correctly suggested that a better traditional requirements process would have mitigated these problems, the pressure to deploy the site quickly was tremendous. It is likely, however, that an agile, dynamic requirements discovery and development process could have led to better project outcomes and public perception while permitting an earlier deployment. It is unreported that such a process was suggested or considered.

Supplemental Materials from the authors on NFRs.

https://phil.laplante.io/requirements/agile.php

Exercises

  • 8.1 How do you fit SRS documentation into an agile framework?
  • 8.2 Is it possible to use agile methodologies when the customer is not on site? If so, how?
  • 8.3 Why are agile methodologies generally not suitable for hardware-based projects as opposed to software projects?
  • 8.4 Why can it be difficult for agile methodologies to cover nonfunctional requirements?
  • 8.5 Are there any problems in encapsulating requirements into user stories?
  • 8.6 For the pet store POS system, generate a user story for customer purchases.
  • 8.7 For the pet store POS system, generate use cases for various customer purchases.
  • 8.8 For the airport baggage handling system, generate a user story for dealing with baggage that is to be diverted to another flight.
  • 8.9 For the airport baggage handling system, generate use cases for dealing with a lost piece of baggage.
  • 8.10 For the airport baggage handling system, generate use cases for dealing with baggage that is to be diverted to another flight.
  • 8.11 For the following systems discuss the advantages and disadvantages of using an agile approach (for the software components):
    • 8.11.1 Pet store POS system
    • 8.11.2 Airline baggage handling system
    • 8.11.3 Smart home system (Appendix A)
  • *8.12 There are a number of software tools, both commercial and open source, that can be used to manage the requirements activities of an agile project. Research these tools and prepare a product comparison matrix.

Notes

  1. Some of this section has been excerpted from Laplante ( 2006 ) with permission.
  2. Most people define agile methodologies as being incremental. But incremental development implies that the features and schedule of each delivered version are planned. In some cases, agile methodologies tend to lead to versions with feature sets and delivery dates that are almost always not as planned.

References

  1. Ambler , S. (2007). Agile Requirements Change Management. http://www.agilemodeling.com/essays/changeManagement.htm (accessed January 2017).
  2. Anthopoulos , L., Reddickb, C. G., & Giannakidou, I. (2016). Why e-government projects fail? An analysis of the Healthcare. Gov. Government Information Quarterly, 33(1): 161–173.
  3. Bass , L., Weber, I., & Zhu, L. (2015). DevOps: A Software Architect’s Perspective . Addison-Wesley Professional, Boston, MA, USA.
  4. Beck , K. (2000). Extreme Programming Explained: Embrace Change . Longman Higher Education, London.
  5. Beck , K., Beedle, M., van Bennekum, A., Cockburn, A., Cunningham, W., Fowler, M., Grenning, J., Highsmith, J., Hunt, A., Jeffries, R. and Kern, J. (2001). “Agile Manifesto” and “Principles Behind the Agile Manifesto.” http://agilemanifesto.org/ (accessed January 2017).
  6. Boehm, B., and Turner, R. (2003). Balancing Agility and Discipline: A Guide to the Perplexed . Addison-Wesley, Boston, MA.
  7. Bose , S., Kurhekar, M., & Ghoshal, J. (2008). Agile Methodology in Requirements Engineering. SETLabs Briefings Online, pp. 13–21.
  8. Cao , L., & Ramesh, B. (2008). Agile requirements engineering practices: An empirical study. Software , 25(1): 60–67.
  9. Cleland-Huang , J. (2014). Don’t fire the architect! Where were the requirements? IEEE Software , 31(2): 27–29.
  10. Cunningham , W. (1992). The WyCash portfolio management system. ACM SIGPLAN OOPS Messenger , 4(2): 29–30.
  11. Inayat , I., Moraes, L., Daneva, M., & Salim, S. S. (2015a, May). A reflection on agile requirements engineering: Solutions brought and challenges posed. In Scientific Workshop Proceedings of the XP2015 (p. 6). ACM, Chicago, IL.
  12. Inayat , I., Salim, S. S., Marczak, S., Daneva, M., & Shamshirband, S. (2015b). A systematic literature review on agile requirements engineering practices and challenges. Computers in Human Behavior ,51: 915–929.
  13. Kassab , M., & Laplante, P. (2022). The current and evolving landscape of requirements engineering state of practice. IEEE Software . DOI: 10.1109/MS.2022.3147692.
  14. Kassab , M., Neill, C., & Laplante, P. (2014). State of practice in requirements engineering: Contemporary data. Innovations in Systems and Software Engineering , 10(4): 235–241.
  15. Laplante , P. A. (2006). What Every Engineer Needs to Know about Software Engineering . CRC/Taylor & Francis, Boca Raton, FL.
  16. Mugridge , R. (2008). Managing agile project requirements with story test-driven development. Software , 25(1): 68–75.
  17. Orr , K. (2004). Agile requirements: Opportunity or oxymoron? IEEE Software , 21(3), 71–73.
  18. Paetsch , F., Eberlein, A., & Maurer, F. (2003, June). Requirements engineering and agile software development. In WET ICE 2003 . Proceedings . Twelfth IEEE International Workshops on Enabling Technologies: Infrastructure for Collaborative Enterprises , 2003 (pp. 308–313). IEEE, Linz, Austria.
  19. Ramesh , B., Cao, L., & Baskerville, R. (2010). Agile requirements engineering practices and challenges: An empirical study. Information Systems Journal , 20(5): 449–480.
  20. Rubin , E., & Rubin, H. (2011). Supporting agile software development through active documentation. Requirements Engineering , 16(2): 117–132.
  21. Savolainen , J., Kuusela, J., & Vilavaara, A. (2010, September). Transition to agile development-rediscovery of important requirements engineering practices. In 2010 18th IEEE International Requirements Engineering Conference (pp. 289–294). IEEE, Sydney, NSW.
  22. Schwaber , K., & Beedle, M. (2001). Agile Software Development with SCRUM . Prentice Hall, Upper Saddle River, NJ.
  23. Sillitti , A., & Succi, G. (2006). Requirements engineering for agile methods. In A. Aurum & C. Wohlin (Eds.), Engineering and Managing Software Requirements (pp. 309–326). Springer, New York.
  24. Venkatesh , V., Hoehle, H., & Aljafari, R. (2014). A usability evaluation of the Obamacare website. Government Information Quarterly , 31(4): 669–680.
  25. Vlaanderen , K., Jansen, S., Brinkkemper, S., & Jaspers, E. (2011). The agile requirements refinery: Applying SCRUM principles to software product management. Information and Software Technology , 53(1): 58–70.
  26. Wagner , S., Méndez-Fernández, D., Kalinowski, M., & Felderer, M. (2018). Agile requirements engineering in practice: Status quo and critical problems. CLEI Electronic Journal , 21(1): 15.
  27. West , D., Grant, T., Gerush, M., & D’Silva, D. (2010). Agile Development: Mainstream Adoption Has Changed Agility . Forrester Research, Cambridge, MA.
  28. Williams , L. (2004). Agile Requirements Elicitation. http://agile.csc.ncsu.edu/SEMaterials/AgileRE.pdf (accessed January 2017).