SE311 · Annotated SlidesChapter 6 — Writing Excellent Requirements
Chapter 6 · Annotated slides

Writing Excellent Requirements

Characteristics of excellent individual requirements and requirement sets, guidelines on perspective, writing style, level of detail, representation techniques and avoiding ambiguity, and sample requirements before and after improvement.

Slide text Study notes Highlight: key words Tips, tricks & traps Seen again elsewhere How it can come up
Slide 1: Slide 1
Exam weight Low

    Hi, Gautam. This is Ruth calling from the Austin branch. We got that latest drop of the website software for the online music “

    store. I wanted to ask you about the song preview feature. That’s not working the way I had in mind .”

    Let me find the requirements you sent for that. Here they are. The user story said, ‘As a Customer, I want to

    Gautam replied, “ listen to previews of the available songs so I can decide which ones to buy.’ My notes say that when we discussed this, you said each song sample should be 30 seconds long and that it should use our built- in MP3 player so the customer didn’t have to wait for another player to launch. Isn’t that working correctly? ”

    Well, yes, that all works fine, ” said Ruth, “

    but there are a couple of problems. I can click on the play icon to start the sample,

    “ but I don’t have any way to pause it or stop it. I’m forced to listen to the entire 30

    -second sample. Also, all the samples start

    at the beginning of the song. Some songs have long introductions so you really can’t hear what they’re like from just the beginning. The sample should start somewhere in the middle of those songs so people could hear what they’re really like. And the sample starts playing at full volume and then stops abruptly. If the customer’s speakers are up pretty loud this could be startling. I think it would be better if we fade in and fade out on each sample. ” Gautam was a little frustrated. “

    I wish you had told me all of this when we spoke earlier. You didn’t give me much to go on so I

    just had to make my best guess. I can do all that, but it’s going to take a few more days. ”

    2
    Exam weight Low
      Slide 3: RE Process
      Exam weight Low

        Characteristics of Excellent Requirements Complete

        Each requirement must contain all the information necessary for the reader to understand it.

        • Functional requirements need to have all the information necessary for the developer to implement it correctly.
        • Use TBD (to be determined) as a standard flag to highlight any gaps
        • Resolve all TBDs before developers proceed with implementation
        Characteristics of Excellent Requirements Complete
        4
        Exam weight High
        1. Excellent requirement statements: complete, correct, feasible, necessary, prioritized, unambiguous, verifiable.
        🎯 How this can come up · 1 question
        MCQ

        "The system shall be user-friendly" mainly fails to be:

        Characteristics of Excellent Requirements Correct

        • Each requirement must accurately describe a capability that will meet some stakeholder’s need and must clearly describe the functionality to be built.
        • You’ll have to go to the source of the requirement to check its correctness
          • a user who supplied the initial user requirement, a higher-level system requirement, a use case, a business rule, or another document.
            • E.g., a low-level requirement that conflicts with its parent is not correct.
        Characteristics of Excellent Requirements Correct
        5
        Exam weight Low

          Characteristics of Excellent Requirements Feasible

          • It must be possible to implement each requirement given:
            • Capabilities and limitations of the system and its operating environment
            • Project constraints of time, budget, and staff
          • During elicitation, developers can provide a reality check on what can and cannot be done technically and what can be done only at excessive cost or effort
          • Incremental development approaches and proof-of-concept prototypes are two ways to evaluate requirement feasibility.
          Characteristics of Excellent Requirements Feasible
          6
          Exam weight Low

            Characteristics of Excellent Requirements Necessary

            • Each requirement should describe a capability that:
              • Provides stakeholders with anticipated business value
              • Differentiates the product in the marketplace
              • Is required for conformance to an external standard, policy, or regulation
            • If someone asks why a particular requirement is included, there should be a good answer
            Characteristics of Excellent Requirements Necessary
            7
            Exam weight Low

              Characteristics of Excellent Requirements Prioritized

              • Prioritize business requirements according to which are most important to achieving the desired value.
              • If all requirements are equally important, the project manager doesn’t know how best to respond to schedule overruns, personnel losses, or new requirements that come along.
              • Requirements prioritization should be a collaborative activity involving multiple stakeholder perspectives.
              Characteristics of Excellent Requirements Prioritized
              8
              Exam weight Low
                Slide 9: Characteristics of Excellent Requirements Unambiguous
                Exam weight Low

                  Characteristics of Excellent Requirements Verifiable

                  • A requirement is verifiable if a tester can devise tests to determine whether or not it was properly implemented
                  • If a requirement isn’t verifiable, deciding whether it was correctly implemented becomes a matter of opinion, not objective analysis
                  • Requirements that are incomplete, inconsistent, infeasible, or ambiguous are also unverifiable
                  • Testers are good at examining requirements for verifiability. Include them in your requirements peer reviews to catch problems early.
                  Characteristics of Excellent Requirements Verifiable
                  10
                  Exam weight Low

                    Characteristics of Requirements Collections Complete

                    • There are always some assumed or implied requirements, although they carry more risk than explicitly stated requirements
                    • Any specification that contains TBDs is incomplete
                    Characteristics of Requirements Collections Complete
                    11
                    Exam weight High
                    1. Excellent requirement SETS: complete, consistent, modifiable, traceable.
                    Memory trickStatements: C-C-F-N-P-U-V. Sets: Complete, Consistent, Modifiable, Traceable.

                    Characteristics of Requirements Collections Consistent

                    • Consistent requirements don’t conflict with other requirements of the same type or with higher-level business, user, or system requirements
                    • If BA doesn’t resolve conflicts among requirements, developers will have to deal with them
                    • Tip: record the originator of each requirement to go back to in case of conflict
                    Characteristics of Requirements Collections Consistent
                    12
                    Exam weight Low

                      Characteristics of Requirements Collections Modifiable

                      To make your SRS modifiable:

                      • maintain a history of changes made to each requirement, especially after they are baselined
                      • Learn about connections and dependencies between requirements so you can find all the ones that must be changed together
                      • Use unique labels for each requirement to make them easily identifiable
                      • Avoid redundancy – repeating a requirement in multiple places where it logically belongs makes the document easier to read but harder to maintain
                      • Cross-reference related items in the SRS to help keep them synchronized when making changes
                      Characteristics of Requirements Collections Modifiable
                      13
                      Exam weight Low

                        Characteristics of Requirements Collections Traceable

                        A traceable requirement can be linked both backward to its origin and forward to derived requirements, design elements, code that implements it, and tests that verify its implementation Unique identifiers are important here as well Avoid combining multiple requirements together into a single statement, because the different requirements might trace to different development components

                        Characteristics of Requirements Collections Traceable
                        14
                        Exam weight Low
                          Slide 15: Characteristics of Reuirements Collections
                          Exam weight Low

                            Guideline for Writing Requirements

                            • There isn’t a formula for writing excellent requirements – the best teachers are experience and feedback from the recipients of your requirements
                            • Receiving constructive feedback from colleagues with sharp eyes is a great help, hence peer reviews
                            • Two important goals of writing requirements:
                              • Anyone who reads the requirement comes to the same interpretation as any other reader
                              • Each reader’s interpretation matches what the author intended to communicate
                            Guideline for Writing Requirements
                            16
                            Exam weight Low
                              Slide 17: Guidelines for Requirements
                              Exam weight Low

                                1- System or User Perspective

                                • You can write functional requirements from the perspective of either something the system does or something the user can do
                                • Effective communication is the overarching goal, so it’s fine to intermingle these styles, using whichever is clearer
                                1. State requirements in a consistent fashion, such as “ The system shall ” or “ The user shall ,” followed by an action verb, followed by the observable result
                                2. Specify the trigger action or condition that causes the system to perform the specified behavior
                                18
                                Exam weight Low
                                1. Write from the system’s view ("The system shall…") or the user’s ("The user shall be able to…"), consistently.

                                1- System or User Perspective

                                [optional precondition] [optional trigger event] the system shall [expected system response]

                                Precondition

                                No

                                trigger

                                E.g., If the requested chemical is found in the chemical stockroom, the system shall display a list of all containers of the chemical that are currently in the stockroom.

                                Because this requirement is describing system behavior, some requirement writers argue that there’s no need to repetitively say “the system shall”. However, including the “shall” and writing in the active voice

                                makes it clear what entity is taking the action described.

                                1- System or User Perspective
                                19
                                Exam weight Low

                                  1- System or User Perspective

                                  The system shall let (allow, permit, or enable) the [a particular user class or name] to [do something] The [user class or actor name] shall be able to [do something] [to some object] [qualifying conditions, response time, or quality statement]

                                  reduces misinterpretation

                                  User class in place “user” –

                                  E.g., The Chemist shall be able to reorder any chemical he has ordered in the past by retrieving and editing the order details

                                  20
                                  Exam weight Low

                                    2- Writing Style

                                    Helps those who are skimming through a document

                                    • Adjust your writing style to put the punch line statement of need or — functionality first, followed by supporting details (rationale, origin, — priority, and other requirement attributes)
                                    • Use tables, structures lists, diagrams, and other visual elements to help break the unvarying tone of functional requirements and provide richer communication to those who learn best in different ways
                                    21
                                    Exam weight Low
                                    1. Style: one requirement per statement, active voice, "shall" for mandatory, consistent terms (glossary), avoid "and/or", "etc.".

                                    2- Writing Style

                                    • SRS is not the place to practice creative writing skills
                                      • Avoid interleaving passive and active voice in an attempt to make the material more interesting to read.
                                      • Don’t use multiple terms for the same concept just to achieve variety (customer, account, patron, user, client).
                                    • Being easy to read and understand is an essential element of well-written requirements; being interesting is, frankly, less important
                                    2- Writing Style
                                    22
                                    Exam weight Low

                                      2- Writing Style - Tips

                                      Clarity and conciseness

                                      • Use complete sentences, proper grammer, spelling and punctuation
                                      • Keep sentences and paragraphs short and direct – avoid jargon
                                      • Define specialized items in glossary
                                      • Write concisely needs to provide the user with the capability to ” can be
                                        • “ shall ” condensed to “
                                      • But remember, clarity is more important than conciseness
                                      23
                                      Exam weight Low

                                        2- Writing Style - Tips

                                        shall

                                        T

                                        he keyword “

                                        ”

                                        that’s not how people talk ”

                                        • Objectors say “
                                        • You might prefer to say must needs to “ ,” “ ,” or something similar, but be consistent
                                        24
                                        Exam weight Low

                                          2- Writing Style - Tips

                                          Active voice

                                          • Write in the active voice to make it clear what entity is taking the action described Recipient Passive Upon product upgrade shipment, the serial number will be updated on the
                                          • ” Performer? contract line ” Will the system do that automatically, or is the user expected to update the serial number?
                                          • ” When Fulfillment confirms that they shipped a product upgrade, the system shall update the customer’s contract with the new product serial number ”
                                          25
                                          Exam weight Low

                                            2- Writing Style - Tips

                                            Individual requirements

                                            • Avoid writing long narrative paragraphs that contain multiple requirements
                                            • Clearly distinguish individual requirements from background or contextual information and or additionally ,” or “ ” in a requirement suggest that also
                                            • Words such as “ ,” “ ,” “ several requirements might have been combined – you don’t necessarily have to and” , but make sure the conjunction is joining two parts of a single abandon “ requirement
                                            26
                                            Exam weight Low

                                              2- Writing Style - Tips

                                              Individual requirements

                                              and/or

                                              • Avoid using “ ” in a requirement; it leaves the interpretation up to the reader The system must permit search by order number, invoice number, and/or
                                                • “ customer purchase order number This requirement would permit the user ” – to enter one, two, or three numbers at once when performing a single search. That might not be what’s intended.
                                              27
                                              Exam weight Low

                                                2- Writing Style - Tips

                                                Individual requirements

                                                unless except

                                                but

                                                • The words “ ,” “ ,” and “ ” also indicate the presence of multiple requirements The Buyer’s credit card on file shall be charged for payment, unless the credit
                                                  • “ card has expired ”
                                                  • Failing to specify what happens when the “unless” clause is true is a common source of missing requirements.
                                                2- Writing Style - Tips
                                                28
                                                Exam weight Low

                                                  2- Writing Style - Tips

                                                  Individual requirements

                                                  unless except ,” and “ ” also indicate the presence of multiple

                                                  but

                                                  • The words “ ,” “ requirements
                                                    • Split into two requirements to address the behavior for the two conditions of the credit card being active and expired
                                                    • “ If the Buyer’s credit card on file is active, the system shall charge the payment to that card. ” and “ If the Buyer’s credit card on file has expired, the system shall allow the Buyer to either update the current credit card information or enter a new credit card for payment. ”
                                                  2- Writing Style - Tips
                                                  29
                                                  Exam weight Low

                                                    3- Level of Detail

                                                    Appropriate detail

                                                    How detailed should the

                                                    • There’s no single correct answer to the commonly asked question, “ requirements be? ”
                                                    • Provide enough specifics to minimize the risk of misunderstanding, based on the development team’s knowledge and experience
                                                    • The fewer the opportunities for discussion about requirements issues, the more specific you need to be
                                                    • If a developer can think of several possible ways to satisfy a requirement and all are acceptable, the specificity and detail are about right
                                                    30
                                                    Exam weight Low
                                                    1. Level of detail: enough that developers and testers share the same understanding; more detail for outsourced or safety-critical work.
                                                    Slide 31: 3- Level of Detail
                                                    Exam weight Low
                                                      Slide 32: 3- Level of Detail
                                                      Exam weight Low

                                                        3- Level of Detail

                                                        Consistent granularity

                                                        • It’s not necessary to specify all of your requirements to the same level of detail – you might go into more depth in an area that presents higher risk than others
                                                        • Within a set of related requirements, though, it’s a good idea to try to write functional requirements at a consistent level of granularity
                                                        3- Level of Detail
                                                        33
                                                        Exam weight Low

                                                          3- Level of Detail

                                                          Consistent granularity

                                                          • Helpful guideline: write individually testable requirements
                                                          • If you can think of a small number of test cases to verify that a requirement was correctly implemented, it’s probably at an appropriate granularity
                                                          • If you envision numerous and diverse tests, perhaps several requirements are combined and ought to be separated
                                                          34
                                                          Exam weight Low
                                                            Slide 35: 3- Level of Detail
                                                            Exam weight Low

                                                              4- Representation Techniques

                                                              • Some alternatives to the natural language requirements are lists, tables, visual analysis models, charts, mathematical formulas, photographs, sound clips, and video clips
                                                              • These won’t suffice as substitutes for written requirements in many cases, but they serve as excellent supplemental information to enhance the reader’s understanding.
                                                              36
                                                              Exam weight Low
                                                              1. Use tables, decision tables, diagrams when text gets complicated.

                                                              4- Representation Techniques

                                                              • Example: The Text Editor shall be able to parse <format> documents that define <jurisdiction> laws.
                                                                • 3 possible values for <format> and 4 possible values for <jurisdiction> , for a total of 12 similar requirements
                                                                • The SRS did indeed contain 12 such requirements, but one of the combinations was missing and another was duplicated.
                                                                • Prevent such errors by representing them in a table, which is more compact and less boring than a requirements list.
                                                              37
                                                              Exam weight Low
                                                                Slide 38: 4- Representation Techniques
                                                                Exam weight Low

                                                                  5- Avoiding Ambiguity

                                                                  • Requirements quality is in the eye of the reader, not the author
                                                                  • If a reader has questions, the requirement needs additional work
                                                                  • Peer reviews are the best way to find places where the requirements aren’t clearly understood by all the intended audiences
                                                                  • Sources of ambiguity:
                                                                    • Boundary values
                                                                    • Fuzzy words
                                                                      • Negative requirements
                                                                    • The A/B construct
                                                                  5- Avoiding Ambiguity
                                                                  39
                                                                  Exam weight High
                                                                  1. Ambiguity sources: vague words (fast, user-friendly, flexible, robust, efficient), "support", "etc.", "and/or", negative requirements, boundary values.
                                                                  Exam trapWords like "fast", "easy", "flexible", "minimize", "several" are unverifiable until quantified.
                                                                  🎯 How this can come up · 1 question
                                                                  MCQ

                                                                  Which is unambiguous?

                                                                  5- Avoiding Ambiguity – Sources

                                                                  Ambiguous language

                                                                  Fuzzy words

                                                                  leads to unverifiable

                                                                  requirements

                                                                  • Use terms consistently and as defined in the glossary
                                                                  • Watch out for synonyms and near-synonyms
                                                                  • Avoid vague and subjective terms
                                                                  • If you use a pronoun to refer to something mentioned earlier, make sure the antecedent is crystal clear
                                                                  • Adverbs introduce subjectivity and hence ambiguity. Avoid words like reasonably, appropriately, generally, approximately, usually, systematically, and quickly because the reader won’t be sure how to interpret them.
                                                                  5- Avoiding Ambiguity – Sources
                                                                  40
                                                                  Exam weight Low
                                                                    Slide 41: 5- Avoiding Ambiguity – Sources
                                                                    Exam weight Low
                                                                      Slide 42: 5- Avoiding Ambiguity – Sources
                                                                      Exam weight Low
                                                                        Slide 43: 5- Avoiding Ambiguity – Sources
                                                                        Exam weight Low
                                                                          Slide 44: 5- Avoiding Ambiguity – Sources
                                                                          Exam weight Low

                                                                            5- Avoiding Ambiguity – Sources

                                                                            Boundary values

                                                                            through inclusive

                                                                            exclusive

                                                                            • Use “ ,” “ ,” and “ ” to denote whether the endpoints of the numerical range lie inside or outside the range Vacation requests of 5 or fewer days do not require approval. Vacation “ requests of longer than 5 days through 10 days require supervisor approval. Vacation requests of longer than 10 days require management approval. ”
                                                                            45
                                                                            Exam weight Low

                                                                              5- Avoiding Ambiguity – Sources

                                                                              Negative requirements – requirements that say what the system will not do rather than what it will do

                                                                              -do-this requirement?

                                                                              • How do you implement a don’t
                                                                              • Double and triple negatives are particularly tricky to decipher! Prevent the user from activating the contract if the contract is not in balance. ”
                                                                                • “ The system shall allow the user to activate the contract only if the contract is in
                                                                                • “ balance.”
                                                                              46
                                                                              Exam weight Low

                                                                                5- Avoiding Ambiguity – Sources

                                                                                Negative requirements

                                                                                • If you need to indicate that a certain functionality is out of scope, include the restriction in the Limitations and Exclusions section of the vision and scope document instead of listing it as a negative requirement
                                                                                47
                                                                                Exam weight Low

                                                                                  Sample Requirements, before and after

                                                                                  Example 1 The Background Task Manager shall provide status messages at regular intervals not less than every 60 seconds.

                                                                                  48
                                                                                  Exam weight Low
                                                                                  1. Before/after samples: split compound requirements, quantify quality attributes, remove design details, define terms.

                                                                                  Sample Requirements, before and after

                                                                                  Example 1 The Background Task Manager shall provide status messages at regular intervals not less than every 60 seconds.

                                                                                  • What are the status messages?
                                                                                  • Under what conditions and in what fashion are they provided to the user?
                                                                                  • If displayed on the screen, how long do they remain visible?
                                                                                  • Is it okay if they just flash up for half a second?
                                                                                  • The timing interval is not clear, and the word “every” just muddles the issue
                                                                                  49
                                                                                  Exam weight Low

                                                                                    Sample Requirements, before and after

                                                                                    Example 1 The Background Task Manager shall provide status messages at regular intervals not less than every 60 seconds.

                                                                                    • Is the interval between status messages supposed to be at least 60 seconds, so providing a new message once per year is okay?
                                                                                    • If the intent is to have at most 60 seconds elapse between messages, would one millisecond be too short an interval? Because of these problems, this requirement is not verifiable
                                                                                    50
                                                                                    Exam weight Low

                                                                                      Sample Requirements, before and after

                                                                                      One way to rewrite it (after we get some information from the customer would be) :

                                                                                      1. The Background Task Manager (BTM) shall display status messages in a designated area of the user interface.

                                                                                      1.1. The BTM shall update the messages every 60 plus or minus 5 seconds after background task processing begins.

                                                                                      1.2. The messages shall remain visible continuously during background processing.

                                                                                      1.3. The BTM shall display the percent of the background task that is completed.

                                                                                      1.4. The BTM shall display a “Done” message when the background task is completed.

                                                                                      1.5. The BTM shall display a message if the background task has stalled.

                                                                                      Sample Requirements, before and after
                                                                                      51
                                                                                      Exam weight Low

                                                                                        Sample Requirements, before and after

                                                                                        • Rewriting a flawed requirement often makes it longer because information was missing
                                                                                        • Splitting this into multiple child requirements makes sense because each will demand separate tests, and also each one will be individually traceable
                                                                                        • If there are other status messages that the BTM might display, list them in a table of conditions and corresponding messages. If they’re documented elsewhere in the document, reference them instead of replicating them.
                                                                                        52
                                                                                        Exam weight Low

                                                                                          Sample Requirements, before and after

                                                                                          1. The Background Task Manager (BTM) shall display status messages in a designated area of the user interface. Defers the placement of the messages to being a design issue If you specify the display location in the requirements, it becomes a design constraint placed on the developer. Unnecessarily constrained design options frustrate the programmers and can result in a suboptimal product design. If we were adding this to an existing appliction that has a status bar, where users are accustomed to seeing status messages, it would make perfect sense to specify that in the SRS.
                                                                                          Sample Requirements, before and after
                                                                                          53
                                                                                          Exam weight Low

                                                                                            Sample Requirements, before and after

                                                                                            Example 2 Corporate project charge numbers should be validated online against the master corporate charge number list, if possible.

                                                                                            54
                                                                                            Exam weight Low

                                                                                              Sample Requirements, before and after

                                                                                              Example 2 Corporate project charge numbers should be validated online against the master corporate charge number list, if possible.

                                                                                              • The phrase “if possible” is ambiguous ? (a question for the developer)
                                                                                                • “ if it’s technically feasible”
                                                                                                • “if the master charge number list can be accessed at run time”?
                                                                                              • If you aren’t sure whether a requested capability can be delivered, use TBD to indicate that the issue is unresolved. After investigation, either the TBD goes away or the requirement goes away.
                                                                                              55
                                                                                              Exam weight Low

                                                                                                Sample Requirements, before and after

                                                                                                Example 2 Corporate project charge numbers should be validated online against the master corporate charge number list, if possible.

                                                                                                • Doesn’t specify what to do when the validation either passes or fails should
                                                                                                • The word “ ” is imprecise
                                                                                                56
                                                                                                Exam weight Low

                                                                                                  Sample Requirements, before and after

                                                                                                  One way to rewrite it:

                                                                                                  At the time the requester enters a charge number, the system shall display

                                                                                                  “ an error message if the charge number is not in the master corporate charge number list. “

                                                                                                  • A related requirement would address the exception condition of the master corporate charge number list not being available at the time the validation was attempted.
                                                                                                  57
                                                                                                  Exam weight Low

                                                                                                    Sample Requirements, before and after

                                                                                                    Example 3 The device tester shall allow the user to easily connect additional components, including a pulse generator, a voltmeter, a capacitance meter, and custom probe cards.

                                                                                                    (This requirement is for a product containing embedded software that’s used to test several kinds of measurement devices)

                                                                                                    58
                                                                                                    Exam weight Low

                                                                                                      Sample Requirements, before and after

                                                                                                      Example 3 The device tester shall allow the user to easily connect additional components, including a pulse generator, a voltmeter, a capacitance meter, and custom probe cards.

                                                                                                      • The word “easily” implies a usability requirement, but it is neither measurable nor verifiable
                                                                                                      • “Including” doesn’t make it clear whether this is the complete list of external devices that must be connected to the tester or if there’s more
                                                                                                      59
                                                                                                      Exam weight Low

                                                                                                        Sample Requirements, before and after

                                                                                                        One way to rewrite it:

                                                                                                        1. The device tester shall incorporate a USB port to allow the user to connect any measurement device that has a USB connection.
                                                                                                        2. The USB port shall be installed on the front panel to permit a trained operator to connect a measurement device in 10 seconds or less.

                                                                                                        Note: The preceding requirements contain some intentional design constraints. The BA shouldn’t make such decision on their own, however. Instead, detect the flawed requirements and discuss them with the appropriate stakeholders so they can be clarified.

                                                                                                        Sample Requirements, before and after
                                                                                                        60
                                                                                                        Exam weight Low

                                                                                                          Sample Requirements, before and after

                                                                                                          TRAP

                                                                                                          Watch out for analysis paralysis. All of the sample “after ” requirements

                                                                                                          can be improved further, but you can’t spend forever trying to perfect the requirements. Remember, your goal is to write requirements that

                                                                                                          are good enough to let your team proceed with design and

                                                                                                          construction at an acceptable level of risk.

                                                                                                          61
                                                                                                          Exam weight Low