需求工程
字数: 0
The process of finding out, analysing, documenting and checking the services and constraints of a software system is called requirements engineering (RE).

需求管理

大型软件系统的需求总是在变化的,一个系统一旦被正式使用,不可避免会产生新的需求。一般有三个基本阶段:
  • 问题分析和变更描述
  • 变更分析和成本计算
  • 变更实现
 
notion image
There are three key activities in RE
notion image
notion image

需求引出和分析

Requirements elicitation and analysis: interact with stakeholders, discovering the user and system requirements.

需求发现

Requirements discovery:有时称“需求导出”,是一个对准备建立的系统和正在使用的系统进行信息收集,并从这些信息当中提取需求的过程。有以下常见的发现技巧:

采访

Interview
  • 封闭式采访Closed Interviews
    • 信息持有者回答一组预定的问题(Stakeholders answers a predefined set of questions
  • 开放式采访 Open Interviews
    • 没有一个预先准备好的程序,需求工程团队即兴提问 (free form discussions with stakeholders

场景

Scenarios: describe how the system can be use for some particular task
(探索)具体的使用场景,用于描述系统或软件在不同情境下的行为和交互。
描述用户在特定情境下使用软件的行为和交互。场景通常包括特定的输入和预期的输出,以及用户的行为和系统的反应。
  • 例如,当用户点击”购买”按钮时,系统应该显示一个确认对话框,询问用户是否确定购买此商品,并提示用户输入付款信息。

深入实际

Ethnography, the scientific description of different races and cultures, is an observational technique that can be used to understand operational processes and help derive requirements for software to support these processes.
💡原译为“人种学”,是“人类学“的分支,是一种研究人类文化和社会行为的方法,可以应用于软件开发的过程中,了解用户的需求。
  • Immerse yourself in the working environment
  • Observe day-to-day work and taking notes
  • Discover implicit requirements of the system

The Importance of the Observation Activity
  • Actual work practices are far richer, more complex, and more dynamic than the models assumed
  • People often find it very difficulty to clearly articulate details of their work
  • People may understand their own work, but may not understand its relationship to other work in the organization

(2022 Final Exam) Ethnography is a technique used during the requirements elicitation and analysis stage of requirements engineering. State the importance of using the technique in requirements engineering. (Make three main points and use an example to support your answer).
  • Understanding users and environments. Ethnography can help development teams uncover implicit needs that users may not be able to articulate.
  • Improving product quality. By observing user behavior and needs, teams can gain a better understanding of how the product will make improvements to its functionality.
  • Promoting team collaboration. By working with users together, team members from different departments can gain a better understanding of each other's work to achieve common goals.

需求分类和组织

Requirements classification and organization: take the unstructured collection of requirements, groups related requirements
notion image
需要向不同类型的读者传达系统信息, 因此不同层次的需求是有用的。

用户需求

User requirements
  • Usually written for non-technical people
  • Often written in natural langue with diagrams
  • High level, abstract statement of a service that a system should provide or a constraint on a system

系统需求

System requirements
  • Usually written for technical people
  • Detailed description of software system’s services and operational constraints
  • Define exactly what is to be implemented
  • It may be part of the contract between system investors and software developers
notion image

功能需求

Functional Requirements: focused on what system should should do.
E.g., How the system should react to particular inputs? How the system should behave in a particular situation?

非功能需求

Non-functional Requirements: specify characteristics of the system as a whole. E.g., reliability, performance, security, etc.
指不直接关系到系统向用户提供的具体服务的一类需求。它们与系统的总体特性相关,如可靠性、响应时间和储存空间占用等。
Functional Requirements
Non-Functional Requirements
Describe what the software must do
Describe how the software must perform
Focused on specific features and functions
Focused on overall quality and performance
Easier to define and measure
More difficult to define and measure
1️⃣
需求的分类
notion image
notion image
2️⃣
需求的度量
Non functional Requirements must be testable, So, 如何评判非功能需求的实现程度?
→ 转化为 Measurable Non-Functional Requirements
把质量需求,如性能、可靠性、安全性等非功能需求,转化为具体场景,在特定环境下对系统进行相应的刺激 (stimulus),从而根据系统反应进行测试。
Example: Quality Attribute Scenario for System Reliability
Example: Quality Attribute Scenario for System Reliability
3️⃣
需求产生的冲突
Issues with too Many Non-Functional Requirements
  • Many non-functional requirements conflict with others, e.g., speed/security, scalability/availability.
  • Realizing a non-functional requirement may require staffs to have specialized skills
  • Extra resources may be needed, for example, specially configured tested, more time required for testing, extra budget to spend on hiring external specialists, etc.

需求优先权排序和协商

Requirements prioritization and negotiation

效用树

Utility Tree:用于软件架构评估
  • 效用(utility)是树的根结点(root node),代表系统的整体质量
  • 质量属性(quality attribute categories)构成树的二级节点,在每个质量属性下对该质量属性的优先级做了进一步的说明。
    • 优先级使用高(H)、中(M)、低(L)的形式
    • 第一个字母代表:每个场景对系统成功的重要影响程度
    • 第二个字母代表:体系结构设计师所估计的实现这种场景的难度
    • notion image
      notion image

需求描述

Requirements Specification

结构化自然语言

Structured Natural Language: Standard Form
notion image
胰岛素泵需求的描述
胰岛素泵需求的描述

图形化符号

Graphical Notation: UML Use Case Diagram
(参考之前系统建模的笔记)
notion image

数学描述

Mathematical Specification: Finite State Machine
notion image

需求文档

Requirements Documentation (IEEE-1998 Standards)
notion image
notion image

需求有效性验证

Requirements Validation:检验需求是否真正按客户的意愿来定义系统的过程

验证类型

  • 有效性检查
    • Validity checks: Whether the requirements reflect the real needs of system users
  • 一致性检查
    • Consistency checks: Identify conflict & confusion requirements
      在文档中,需求不应该彼此冲突,同一个系统功能不应出现不同的描述或相互矛盾的约束。
  • 完备性检查
    • Completeness checks: Whether the documented requirements define all functions and constraints
      检查需求文档应该包括所有系统用户想要的功能和约束
  • 真实性检查
    • Realism checks: Whether the software system can be implemented within the proposed budget or supported by existing technologies
      基于对已有技术的了解,考虑到系统开发的预算和进度安排,检查需求以保证能真正实现。
  • 可检验性检查
    • Verifiability: Whether functions and quality attributes are verifiable

验证方法

  • 需求评审
  • 原型建立
    • 为客户提供一个可执行的系统模型,他们能在这个模型上体验从而检查系统是否符合他们的真正需要。
  • 测试用例生成
notion image
 
2023 - 2026