软件质量工程 02

软件质量(Software Quality)

定义

  • 软件质量(Software Quality):根据 IEEE 标准 730-2014,软件质量是指产品满足既定需求的程度,这些需求准确反映了利益相关者的需要、期望和愿望。
  • 关键特性
    • ||满足需求(Meeting the Requirements)||
    • ||实现利益相关者满意度(Producing Stakeholder Satisfaction)||
  • 实现途径
    • ||满足利益相关者的需求和期望||
    • ||遵循相关法规和标准(Relevant regulations and standards)||
  • 利益相关者的质量要求
    • ||效率(Efficiency)||
    • ||可靠性(Reliability)||
    • ||可用性(Usability)||
    • ||安全性(Security)||
  • 质量工程师/分析师的要求
    • ||可维护性(Maintainability)||
    • ||互操作性(Interoperability)||
    • ||灵活性(Flexibility)||
    • ||可重用性(Reusability)||
  • 主要难点
    • 不完整或不一致的规格说明(Incomplete and/or inconsistent specifications)
    • 定义规格说明的困难(Defining the specifications)

软件质量工程(Software Quality Engineering, SQE)与软件质量保证(Software Quality Assurance, SQA)的必要性

  • 问题:是否需要在组织和软件项目中实施 SQE/SQA 标准?是否可以仅依靠经验和专业知识,选择适合组织的流程和方法?
  • 实施 SQE/SQA 标准的优势
    • 使软件项目和部门能够采用最先进的开发和维护方法与流程(state-of-the-art methodologies and procedures)
    • 提高开发团队之间的相互理解和协调,尤其是在开发与维护团队之间(Better mutual understanding and coordination among development teams)
    • 促进软件开发商与项目外部参与者的合作(Better cooperation between the software developer and external participants)
    • 基于已知标准的开发、维护和质量保证,促进软件供应商与客户/采购者之间的理解与合作(Better understanding and cooperation between software suppliers and customers/acquirers)
  • 解释:实施标准化的 SQE/SQA 流程能够减少因个人经验差异导致的不一致性,提高项目可预测性和可控性,尤其在复杂项目或跨团队合作中效果显著。

软件质量保证标准的分类

分类方式

软件开发和质量保证标准分为两类:

  1. ||过程标准(Process Standards)||:
    • 聚焦于软件开发和维护项目的实施方法,关注“如何”实现项目(Focus on methodologies for carrying out software development and maintenance projects)
    • 目标:确保特定软件项目的质量(Assure quality)
    • 示例:
      • IEEE 730 标准
      • ISO/IEC/IEEE 12207 标准
      • IEEE 1012 标准
  2. ||管理标准(Management Standards)||:
    • 聚焦于组织的软件开发和 SQA 管理基础设施及要求,方法和工具的选择由组织决定
    • 目标:确保供应商的软件质量,评估其软件过程能力(Assure the software products achieve an acceptable level of quality)
    • 示例:
      • ISO/IEC/IEEE 90003:2018 标准
      • SEI CMMI(能力成熟度模型集成, Capability Maturity Model Integration)
      • ISO/IEC 15504 标准

对比表格

中文

特征 过程标准 管理标准
目标单位 软件开发和/或维护的项目团队 软件质量管理(SQA)部门及软件开发与维护的管理工作
主要关注点 实施软件开发和维护任务的方法论(项目层面的技术执行,如需求分析、设计、测试等) 软件质量管理体系的组织结构、基础设施和要求(组织层面的质量体系构建与监督,如质量方针、资源配置、审核机制)
标准的目的 指导“如何”执行开发和维护工作 明确“要实现什么”目标
标准的目标 保证特定软件项目的质量 保证供应商的软件质量并评估其软件过程能力
示例 IEEE 730 标准
ISO/IEC/IEEE 12207 标准
IEEE 1012 标准
ISO/IEC/IEEE 90003:2018 标准
SEI CMMI(能力成熟度模型集成)
ISO/IEC 15504 标准

英文

Characteristics Process standards Management standards
The target unit A software development and/or maintenance project team Management of software development and/or maintenance and the specific SQA units.
The main focus Methodologies for carrying out software development and maintenance projects Organization of SQA systems, infrastructure, and requirements
Standard’s objective “How” to perform “What” to achieve
Standard’s goal Assuring the quality of a specific software project Assuring supplier’s software quality and assessing its software process capability
Examples IEEE 730 Standard
ISO/IEC/IEEE 12207 Standard
IEEE 1012 Standard
ISO/IEC/IEEE 90003:2018 Standard
SEI CMMI
ISO/IEC 15504 Standard

软件失败(Software Failures)

软件错误原因分类

软件错误的原因可分为以下九类:

  1. 错误的需求定义(Faulty Definition of Requirements)
    • 错误的、缺失的、不完整的需求或包含不必要的需求
  2. 客户-开发者沟通失败(Client-Developer Communication Failures)
    • 误解客户指令、需求变更,或忽略客户反馈
  3. 故意偏离软件需求(Deliberate Deviations from Software Requirements)
    • 复用旧模块、因时间或预算压力省略功能、未经批准的改进
  4. 逻辑设计错误(Logical Design Errors)
    • 算法错误、流程图或序列错误、边界条件定义错误、遗漏状态或操作
  5. 编码错误(Coding Errors)
    • 误解设计文档、编程语言错误、数据选择错误
  6. 不遵守文档和编码指令(Noncompliance with Documentation and Coding Instructions)
    • 难以理解的软件、未妥善处理发现的错误、不合规的代码或团队成员
  7. 测试流程不完善(Disintegrated Testing Process)
    • 测试计划不完整、未记录或报告错误、未及时修复错误、测试不充分
  8. 用户界面和流程错误(User Interface and Procedure Errors)
    • 未检查用户界面和流程、数据检查失败、错误流程
  9. 文档错误(Documentation Errors)
    • 遗漏功能说明、用户说明错误、列出不存在的功能

软件质量因素

质量模型对比

McCall 模型 ISO/IEC 25010 质量模型 其他因素
正确性(Correctness) 功能适用性(Functionality Suitability) 可管理性(Manageability)
可靠性(Reliability) 性能效率(Performance Efficiency) 有效性(Effectiveness)
效率(Efficiency) 兼容性(Compatibility) 可演化性(Evolvability)
完整性(Integrity) 可用性(Usability) 可扩展性(Extensibility)
可用性(Usability) 可靠性(Reliability) 生产力(Productivity)
可测试性(Testability) 安全性(Security) 安全性(Safety)
灵活性(Flexibility) 可维护性(Maintainability) 满意度(Satisfaction)
可维护性(Maintainability) - 可支持性(Supportability)
- - 生存能力(Survivability)
- - 可理解性(Understandability)
- - 可验证性(Verifiability)
- - 可修改性(Modifiability)
- - 人因工程(Human Engineering)
  • McCall 模型:正确可靠效率高,完整可用易测试,灵活维护更优秀
  • ISO/IEC 25010 质量模型:功能性能兼容好,可用可靠保安全,维护移植更高效

软件质量工程概念图

工作计划

  • 目标:创建软件质量工程(SQE)的概念图,包含以下核心概念:
    • 软件质量工程(SQE)
    • 质量保证(QA)
    • 软件测试(Software Test)
    • 视角(Perspectives)
    • 错误(Error)、故障(Fault)、失败(Failure)、缺陷(Defect)、漏洞(Bug)
    • 度量(Measures)
    • 质量过程/计划(Quality Process/Plan)
    • 目标(Goals)
    • 成本(Cost)
    • 软件开发阶段(Stages of Software Development)
    • 预防(Prevention)、减少(Reduction)、遏制(Containment)
  • 步骤
    1. 确定概念及关系
    2. 全体讨论,共同创建概念图
    3. 个人版本持续更新
  • 概念图示例
    graph TD
        A[软件质量工程 SQE] --> B[质量保证 QA]
        A --> C[软件测试 Software Test]
        A --> D[质量过程/计划 Quality Process/Plan]
        B --> E[预防 Prevention]
        B --> F[减少 Reduction]
        B --> G[遏制 Containment]
        C --> H[错误 Error]
        C --> I[故障 Fault]
        C --> J[失败 Failure]
        C --> K[缺陷 Defect]
        C --> L[漏洞 Bug]
        D --> M[度量 Measures]
        D --> N[目标 Goals]
        D --> O[成本 Cost]
        A --> P[软件开发阶段 Stages]

人员能力成熟度模型(People Capability Maturity Model, P-CMM)

images/PCMM-不同阶段.png

  • 定义:P-CMM 是一种用于评估和改进组织人力资源能力成熟度的框架,旨在通过系统化的人力资本管理提升员工绩效与组织竞争力。

    P-CMM (People Capability Maturity Model) is a framework used to assess and improve the maturity of an organization’s human resource capabilities, aiming to enhance employee performance and organizational competitiveness through systematic human capital management.

  • 阶段

    1. ||初始级(Initial)||:人力资源实践是随意的、反应式的,缺乏标准化流程。依赖个别员工的能力而非系统性方法。
    2. ||可重复级(Repeatable)||:建立了基本的人力资源政策和流程(如招聘hiring、入职onboarding、绩效评估performance assessment),可以重复使用并适应类似情境。
    3. ||定义级(Defined)||:人力资源实践被制度化institutionalized、标准化standardized,并与组织的战略目标相结合,形成统一的流程指南和角色职责。
    4. ||已管理级(Managed)||:使用量化指标对人力资源流程进行测量和控制,确保其有效性和一致性。
    5. ||优化级(Optimizing)||:组织持续改进人力资源流程,通过创新和最佳实践推动员工能力和组织绩效的不断提升。
  • 在软件开发中的应用

    • 提升团队效能(Improve team effectiveness)
    • 支持过程改进(Support process improvement)
    • 降低项目风险(Reduce project risks)
    • 增强组织竞争力(Enhance organisational competitiveness)
    • 促进知识管理和持续学习(Promote knowledge management and continuous learning)

与质量相关的5种成本类型

  • 预防成本(prevention cost): 规划和执行项目以使其无错误或在可接受的错误范围内
  • 评估成本(appraisal cost): 评估流程及其输出以确保质量的成本
  • 内部故障成本(internal failure cost): 在客户收到产品之前纠正已发现的缺陷所需的成本
  • 外部故障成本(external failure cost): 与交付给客户之前未发现和纠正的所有错误相关的成本
  • 测量和测试设备成本(measurement and test equipment costs): 用于执行预防和评估活动的设备成本

可能的考点与示例考题

考点

  1. 软件质量的定义与关键特性
    • 理解 IEEE 标准 730-2014 的定义
    • 区分利益相关者和质量工程师的需求
  2. SQA 标准的分类
    • 过程标准与管理标准的区别
    • 标准示例及其目标
  3. 软件错误原因
    • 九类错误原因的定义与示例
    • 如何预防和解决
  4. 软件需求规格说明书(SRS)
    • SRS 的结构与作用
    • 如何映射到自动化测试
  5. 软件质量因素
    • McCall 和 ISO/IEC 25010 模型的比较
    • 其他质量因素的应用
  6. 公司中的质量工程
    • 质量规划、保证和控制的措施
    • 质量成本的分类
  7. P-CMM 模型
    • 五个阶段的定义
    • 在软件开发中的应用

示例考题

  1. 简答题:简述软件质量(Software Quality)的定义,并列举两个利益相关者的质量要求和两个质量工程师的要求。(10 分)
    • 参考答案
      • 中文:软件质量是指产品满足既定需求的程度,这些需求准确反映利益相关者的需要、期望和愿望(IEEE 730-2014)。利益相关者的质量要求包括:效率(Efficiency)、可靠性(Reliability);质量工程师的要求包括:可维护性(Maintainability)、互操作性(Interoperability)。
      • English:Software Quality is the degree to which a product meets established requirements that accurately represent stakeholder needs, wants, and expectations (IEEE 730-2014). Stakeholder quality requirements include Efficiency and Reliability; quality engineer requirements include Maintainability and Interoperability.
0%