《软件工程-实践者研究方法》chapter15
软件工程-实践者的研究方法
软件工程-实践者的研究方法在软件工程领域,实践者经常面临着各种各样的问题,需要进行研究来解决这些问题。
研究方法在实践者的工作中起到了至关重要的作用,帮助他们系统地获取、分析和应用相关信息。
本文将介绍几种常见的软件工程实践者的研究方法,包括案例研究、调查研究、实验研究和文献综述。
一、案例研究案例研究是软件工程实践者常用的一种研究方法。
它通过详细地调查和分析实际的软件项目或实践案例,来获取关于软件开发和维护过程的有用信息。
案例研究可以帮助实践者深入了解实际工作中的问题、挑战和解决方法,从而提高他们的技术水平和工作效率。
二、调查研究调查研究是另一种常用的软件工程实践者的研究方法。
它通过问卷调查、访谈或观察等方式收集数据,以了解实践者在软件开发和维护过程中的实际行为、经验和观点。
调查研究可以帮助实践者了解目标用户的需求和期望,从而指导他们进行需求分析和设计工作。
三、实验研究实验研究是一种系统的、科学的研究方法,广泛应用于软件工程领域。
实践者可以设计和进行实验,以验证和评估不同的软件开发方法、工具和技术。
实验研究可以帮助实践者比较不同的解决方案,评估其性能和效果,从而帮助他们做出更为科学和合理的决策。
四、文献综述文献综述是软件工程实践者常用的一种研究方法。
它通过查阅和分析已有的文献和相关资料,来了解和总结某个特定主题的研究进展、方法和结果。
文献综述可以帮助实践者了解目前领域内的最新进展和成果,从而指导他们的实际工作和研究方向。
除了上述几种常见的研究方法,实践者还可以结合不同的方法进行混合研究。
例如,可以通过案例研究和调查研究相结合,来获取更全面和准确的信息;或者可以通过实验研究和文献综述相结合,来验证和支持已有的理论和方法。
总之,软件工程实践者在进行研究时可以选择多种方法,根据实际情况来确定最合适的方法。
无论选择哪种方法,都应该注重数据的收集和分析,严谨地进行研究,以获取有价值的结果,并将其应用到实际工作中,不断提高软件开发和维护的质量和效率。
《软件工程-实践者的研究方法》chapter_17_cn_软件配置管理PPT精品文档23页
u se -case s an aly sis m o d e l
sce n ario -b ase d d iag ram s f lo w -o rie n t e d d iag ram s class-b ase d d iag ram s b e h av io ral d iag ram s d e sig n m o d e l arch it e ct u ral d iag ram s in t e rf ace d iag ram s co m p o n e n t -le v e l d iag ram s t e ch n ical m e t rics
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s
Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001,
Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001,
2005
9
SCM 库
SCM中心库是一组机制和数据结构,使软件团队能够 用一种更有效地方法管理变更。
已经通过正式评审和批准的规格说明或产品,它可以作为 进一步开发的基础,并且只有通过正式的变更控制规程才 能修改它。
软件工程 实践者的研究方法 PPT
Need to process
Class A{ Private: int attribute; Public: A(){attribute=2;} Will changing the world int f(){return attribute;} }
Need teamwork
return attribute;
Tasks of software development
All software construction involves essential tasks, the fashioning of the complex conceptual structures that compose the abstract software entity
(1)The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is, the application of engineering to software. (2)The study of approaches as in (1) (1)应用系统化的、学科化的、定量的方法,来 开发、运行和维护软件,即,将工程应用到软件。 (2)对(1)中各种方法的研究。
软件工程经典论文推荐: /teaching/courses/seoc1/2005_2006/resources/
参考资料
Course overview
考核
作业
《软件工程——实践者的研究方法》
《软件工程——实践者的研究方法》计算机软件作为非传统产业的制成品,有着许多独特的性质。
它具有不可见性、易变更性,对于这样一种智力劳动的成果人们难于把握它的质量,也难于组织好它的开发和生产过程。
我们对它的分析和研究,绝不可忽视其与传统产品及其开发过程相异的特殊性。
然而,从另一方面看,软件工程也是工程,虽然它是一门年轻的工程学课,仍然可以借鉴人们千百年来所积累的,在传统工程领域行之有效的规律和经验,例如规范化、标准化和模块化等等。
显然,软件工程需要统合与兼顾上述两个方面的特征。
任何过分强调某一方面,或是忽略某一方面的思维方式和行为都是错误的,并且这种综合与兼顾需要在不断探索中前进和发展。
Roger Pressman博士这本书很好地把握这些特征,对于软件工程学课的发展起了重要的推动作用。
本书在国际软件工程界产生了巨大的影响。
从而树立了它无可置疑的权威地位。
一本优秀的著作,特别是一本成功的教学用书可以影响一代人,甚至几代人的业务成长。
本书从1982年第1版开始,就受到我国软件工程界的重视,成为高等学校计算机专业软件工程课的重要教学参考书。
20多年来,它的各个后续版本一直都是我国软件专业人士喜爱和熟悉的读物。
它在全面而系统、概括而清晰地介绍软件工程有关的概念、原则、方法和工具方面都获得了国内广大读者的好评。
如前所述,本书在给出对学科发展具有深刻影响的传统方法时,又适当地引入了当前正在发展着、且有着生命力的新技术。
这里介绍的第六版具有几个特点:(1) 在第5版的基础上做了大量的充实和更新,以适应软件工程新技术的发展,例如,突出了软件过程,增加了敏捷开发方法。
(2) 除各章后面提供了大量进一步阅读的参考文献信息外,还针对不同的读者群(例如,学生、教师和专业人员等)提供了多种形式的材料,范围广泛、内容丰富,且使用方便。
(3) 为了方便阅读和理解,除在各章开头给出全章内容简介和关键词外,在文中穿插了许多形式不同的解释框。
软件工程实践者的研究方法_背诵知识点20141224
软件工程实践者的研究方法_背诵知识点20141224软件的定义:软件是:1)指令的集合,通过执行这些指令可以满足预期的特征、功能和性能需求;2)数据结构,使得程序可以充分利用信息;3)软件描述信息,以硬拷贝和虚拟形式存在,描述程序操作和使用。
软件与硬件的区别:软件是设计开发的;软件不会磨损;大多数软件是按需求定制的。
IEEE定义:(1)将系统化、规范化、可量化的方法应用于软件的开发、运行和维护,即将工程化方法应用于软件;(2) 在(1)中所述方法的研究。
软件工程的层次:软件工程的根基在于质量关注点。
软件工程的基础是过程层。
过程将各个技术层次结合在一起,使得合理地、及时地开发计算机软件成为可能。
方法为构建软件提供技术上的解决方法("如何做")。
工具为过程和方法提供自动化或半自动化的支持。
通用过程模型的5种框架活动:沟通、策划、建模、构建、部署8个典型的普适性活动:软件项目跟踪与控制;风险管理;软件质量保证;技术评审;测量;软件配置管理;可复用管理;工作产品的准备和生产软件神化:关于软件及其开发过程被人们盲目相信的一些说法,它实际上误导了人们对软件开发的态度。
螺旋模型:一种风险驱动型的过程模型,一种演进式软件过程模型。
它结合了原型的迭代性质和瀑布模型的系统性和可控性特点。
具有快速开发越来越完善软件版本的潜力。
统一过程(UP):以用例为驱动、以系统架构为核心,迭代式增量式开发过程。
RUP包括起始、细化、构建、转换和生产5个阶段。
五个UP阶段并不是顺序地进行,而是阶段性地并发进行。
成熟度级别:第0级:不完全级、1已执行级、2已管理级、3已定义级、4已定量管理级、5优化级软件生命周期:软件计划与可行性研究、需求分析、软件设计、编码、软件测试、运行与维护瀑布模型:一个系统的、顺序的软件开发方法。
缺点:实际项目开发中很少遵守瀑布模型提出的顺序;客户难以清楚的描述所有的需求;客户要等到开发周期的晚期才能得到可执行的程序;在线性过程的开始和结束,容易发生“阻塞状态”。
《软件工程-实践者的研究方法》chapter_15
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Chapter 15
Testing Conventional Applications
Slide Set to accompany
Software Engineering: A Practitioner’s Approach, 7/e
by Roger S. Pressman
Slides copyright © 1996, 2001, 2005, 2009 by Roger S. Pressman
11
Cyclomatic Complexity
A number of industry studies have indicated that the higher V(G), the higher the probability or errors.
modules
V(G)
modules in this range are more error prone
2
What is a “Good” Test?
A good test has a high probability of finding an error
A good test is not redundant. A good test should be “best of breed” A good test should be neither too
《软件工程-实践者的研究方法》chapter_09_cn_构件设计共15页
Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001,
2005
2
什么是构件?
在面向对象软件工程环境中,构件包括一组协作的类 (有时,一个构件只包含一个单独的类)。
2005
5
基本设计原则
开关原则/The Open-Closed Principle (OCP). “A module [component] should be open for extension but closed for modification.
什么是构件?
构件是计算机软件中的一个模块化的构造块。 OMG UML规范对构件的定义:系统中模块化的、可配
置的和可替换的部件,该部件封装了实现并暴露了一组 接口。 OMG Unified Modeling Language Specification [OMG01] defines a component as
com put ePageC ost ( ) com put ePaper C ost ( ) com put ePr odC ost ( ) c o m p u t e To t a lJ o b C o s t ( )
< < in t e r f a c e > > in it ia t e J o b
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s
Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001,
软件工程-实践者的研究方法-精选文档
Co m p o n e n t L e v e l D e sig n
use-cases - text use-case diagrams activity diagrams swim lane diagrams
data flow diagrams control-flow diagrams processing narratives
2
Analysis Model => Design Model
Evaluation only. ted with Aspose.Slides for .NET 3.5 Client Profile 5.2 Copyright 2019-2019 Aspose Pty Ltd.
sc e n a r i o - b a se d e le me nt s f low- or ie nt e d e le me nt s
4
Quality Guidelines
Evaluation only. ted with Aspose.Slides for .NET 3.5 Client Profile 5.2 Copyright 2019-2019 Aspose Pty Ltd.
A design should exhibit an architecture that (1) has been created using recognizable architectural styles or patterns, (2) is composed of components that exhibit good design characteristics and (3) can be implemented in an evolutionary fashion A design should be modular; that is, the software should be logically partitioned into elements or subsystems A design should contain representations of data, architecture, interfaces, and components. A design should lead to data structures that are appropriate for the classes to be implemented. A design should lead to components that exhibit independent functional characteristics. A design should lead to interfaces that reduce the complexity of connections between components and with the external environment. A design should be derived using a repeatable method that is driven by information obtained during software requirements analysis. A design should be represented using a notation that effectively communicates its meaning.
软件工程实践者的研究方法讲义(PPT29张)
软件风险
一般认为软件风险包含两个特性:
不确定性——风险可能发生也可能不发生; 损失——如果风险发生,就会产生恶性后果或损失。
进行风险分析时,重要的是量化每个风险的不 确定程度和损失程度。为了实现这点,必须考虑 不同类型的风险。 项目风险威胁到项目计划。如果项目风险发生, 就有可能会拖延项目的进度和增加项目的成本。 项目风险是指预算、进度、人员、资源、利益相 关方、需求等方面的潜在问题以及它们对软件项 目的影响。
风险管理
工作产品是风险缓解、监测和管理计划或 一且风险信息表单。 所要分析和管理的风险,应该通过彻底研 究人员、产品、过程和项目来确定。 RMMM计划应该随着项目的进展而修订, 以保证所考虑的风险是近期可能发生的。 风险管理的应急计划应该是符合实际的。
风险管理
首先,风险涉及的是未来将要发生的事情。 今天和昨天的事情已不再关心。问题是: 我们是否能够通过改变今天的行为,而为 一个不同的、充满希望的、更美好的明天 创造机会。其次,风险涉及改变。如思想、 观念、行为、地点的改变……第三,风险 涉及选择,而选择本身就具有不确定性。 [CHA89]
1.高层的软件管理者和客户管理者已经正式承诺支持该项目了吗? 2.最终用户对项目和待开发的系统/产品热心支持吗? 3.软件工程团队及其客户充分理解需求了吗? 4.客户已经完全地参与到需求定义中了吗? 5.最终用户的期望现实吗? 6.项目范围稳定吗? 7.软件工程团队的技能搭配合理吗? 8.项目需求稳定吗? 9.项目团队对将实现的技术有经验吗? 10.项目团队的人员数满足项目需要吗? 11.所有的客户/用户对项目的重要性和待开发的系统/产品的需求有共识 吗?
风险管理
对于软件工程领域中的风险,以上三条概念定义 是显而易见的。未来是我们所关心的——什么样的 风险会导致软件项目彻底失败?改变也是我们所关 心的——客户需求、开发技术、目标环境以及所有 其他与项目相关因素的改变将会对进度安排和总体 成功产生什么影响?最后,我们必须抓住选择机 会——应该采用什么方法及工具?需要多少人员参 与?对质量的要求要达到什么程度才是“足够的”? 当没有办法消除风险,甚至连试图降低该风险也 存在疑问时,这个风险就是真正的风险了。“在弄 清楚软件项目中的”真正风险“之前,识别出所有 对管理者及开发者而言显而易见的风险是很重要的。
软件工程-实践者的研究方法
采用看板方式进行流程管理,通过可视化工作流来调整和优化软件开发过程,注重工作流 优化和持续改进。
Extreme Programming(XP)
注重编程实践和代码质量,强调简单设计、重构、测试驱动开发等实践,旨在提高软件质 量和开发效率。
面向对象开发方法论
面向对象分析(OOA)
通过识别对象、封装属性和行为以及建立类 和继承关系来描述问题域和解决方案域。
在合并分支时,应妥善处理可能出现的冲突,确保代码的完整性和 一致性。
持续集成与持续部署
自动化构建
使用自动化构建工具,如Jenkins、Travis CI等,可 以快速构建和测试代码。
自动化测试
编写自动化测试用例,确保代码的质量和功能正确性。
持续部署
通过持续部署,可以将代码快速部署到生产环境,提 高开发效率和响应速度。
管理企业级软件需要制定详细的计划和流程,以 确保软件的开发、测试、部署和维护都得到有效 的控制和管理。
案例二:移动应用的开发与部署
01
移动应用是指可以在移动设备上运行的应用程序,如手机应用程序和 平板电脑应用程序。
02
在开发移动应用时,需要考虑设备的屏幕尺寸、操作系统和网络环境 等因素,以确保应用的用户体验和性能。
软件工程的目标是提高软件质量、降低开发成本、缩短开发周期和提高软件可靠性。
软件工程的重要性
1
软件工程是现代信息社会的基础,它广泛应用于 各个领域,如金融、医疗、交通和航空等。
2
软件工程能够提高软件开发的效率和质量,降低 软件维护成本,提高软件可靠性,从而为企业创 造更大的价值。
3
软件工程能够提高企业的竞争力,推动产业的发 展和进步。
挑战
软件工程-实践者的研究方法-知识点
For personal use only in study and research; not for commercial use软件工程复习总结第1章软件工程介绍1.软件的定义软件是包括程序、数据及其相关文档的完整集合。
其中,程序是按照事先设计的功能和性能要求执行的指令序列;数据是使程序能正常操作信息的数据结构;文档是与程序开发、维护和使用有关的图文材料。
For personal use only in study and research; not for commercial use软件的定义:1、指令的集合,通过执行这些指令可以满足预期的特征、功能和性能需求2、数据结构,它使得程序可以充分利用信息3描述程序操作和使用的文档2.软件的特征a) 软件是设计开发的,而不是传统意义上的生产制造的b) 软件不会磨损c) 虽然整个工业向着基于构件的构造模式发展,然而大多数软件仍是根据实际的顾客需求定制的3.软件与硬件的区别a) 软件是一种逻辑实体,而不是具体的物理实体b) 软件的生产与硬件不同,软件开发过程中没有明显的制造过程c) 软件在运行、使用期间没有磨损、老化问题d) 软件的开发、运行受到计算机系统的限制,不同程度地依赖于硬件和环境,导致了软件升级和移植地问题e) 软件复杂性越来越高f) 软件开发成本相当昂贵g) 大多数软件是新开发的,而不是通过已有的构件组装而来的h) 软件工程涉及诸多的社会因素4.遗留软件与软件的演化系统演化的原因:a) 系统需要修改其适应性,从而满足新的计算环境或者技术的需求b) 软件必须根据新的业务需求进行升级c) 软件必须扩展以具有与更多现代系统和数据库的协作能力d) 软件架构必须进行改建以适应多样化的网络环境30年来软件发展的规律:1、持续变化规律,2、复杂性增长规律,3、自我调控规律,4、组织稳定性守恒规律,5、保证通晓性规律,6、持续增长规律,质量衰减规律,7、反馈系统规律。
《软件工程-实践者的研究方法》chapter_12_cn_评审技术
ppt课件Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S.
Pressman & Associates, Inc., copyright © 1996, 2001, 2005Software Engineering: A Practitioner’s Approach,
6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 199员领导,并面向技术人员的一个会议 在软件工程过程中,对一个工作产品的技术评估 一种软件质量保证机制 一个培训园地
4
What Do We Look For?
Errors and defects
Error—a quality problem found before the software is released to end users
Defect—a quality problem found only after the software has been released to end-users
ppt课件Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S.
Pressman & Associates, Inc., copyright © 1996, 2001, 2005Software Engineering: A Practitioner’s Approach,
软件工程实践者的研究方法(中文第七版) 复习知识点总结
软件工程实践者的研究方法(中文第七版)复习知识点总结统一过程模型的图、撰写用例规约、UML用例图、UML活动图、UML泳道图、UML状态图(P140)、UML顺序图(P141)、UML类图、第一章定义:软件工程是(1)将系统化、规范化、可量化的方法应用于软件的开1.IEEE 发、运行和维护,即将工程化方法应用于软件;(2) 在(1)中所述方法的研究。
2. 软件与硬件的区别:本质逻辑与物理;软件是设计开发的,并非传统意义上生产制造的;软件不会磨损;大部分软件是按需定制的。
3.遗留软件的特点:生命周期长、业务关键性、质量差第二章1.软件工程与软件过程的区别:软件过程是工作产品构建时所执行的一系列活动、动作和任务的集合。
软件过程定义了软件工程化中采用的方法,但软件工程还包括该过程中应用的技术—技术方法和自动化工具。
2.软件工程的三个要素:过程、方法和工具。
软件工程的目标(根基):质量关注点。
3.软件工程的通用过程框架定义了5个框架活动和8个普适性活动:五种框架活动:沟通、策划、建模、构建、部署。
8个普适性活动:项目跟踪控制、风险管理、质量保证、配置管理、技术评审、测量、可复用管理、工作产品的准备和生产。
4.课本21页软件过程框架图每个框架活动由一系列软件工程动作构成;每个软件工程动作由任务集合来定义,这个任务集合明确了工作任务、工作产品、质量保证点、项目里程碑。
(任务集的例子P22、P23)5.过程流(P22图)描述了在执行顺序和执行时间上,如何组织框架中的活动、动作和任务。
主要类型有:线性过程流、迭代过程流、演化过程流、并行过程流。
6.过程模式模板(非重点)P247.过程评估与改进:以改进为目标,评估力求理解软件的当前状态。
用于过程改进的CMMI标准评估方法提供了五部的过程评估模型:启动、诊断、建立、执行、学习。
用于组织内部过程改进的CMM评估8. 瀑布模型(经典生命周期):特点—文档驱动优点:消除非结构化软件;降低软件的复杂度,促进软件开发工程化缺点:实际项目开发中很少遵守瀑布模型提出的顺序;客户难以清楚的描述真正的需求;客户要等到开发周期的晚期才能看到程序运行的测试版本 ;在线性过程的开始和结束,容易发生“阻塞状态”适用于:需求确定、采用线性方式完成的工作中。
外文翻译--《软件工程-实践者的研究方法》
附录Software Engineering-A PRACTITIONER’S APPROACHWritten by Roger S. Pressman, Ph.D. (P.340-P.343)13.3DESIGN PRINCIPLESSoftware design is both a process and a model. The design process is a sequence ofsteps that enable the designer to describe all aspects of the software to be built. It is important to note, however, that the design process is not simply a cookbook. Creative skill, past experience, a sense of what makes “good” software, and an overallcommitment to quality are critical success factors for a competent design.The design model is the equivalent of an architect’s plans for a house. It begins by representing the totality of the thing to be built (e.g., a three-dimensional renderingof the house) and slowly refines the thing to provide guidance for constructing eachdetail (e.g., the plumbing layout). Similarly, the design model that is created for softwareprovides a variety of different views of the computer software.Basic design principles enable the software engineer to navigate the design process.Davis suggests a setof principles for software design, which have beenadapted and extended in the following list:• The design process should not suffer from “tunnel vision.” A gooddesigner should consider alternative approaches, judging each based on therequirements of the the resources available to do the job, and thedesign concepts presented in Section • The design should be traceable to the analysis model. Because a singleelement of the design model often traces to multiple requirements, it is necessaryto have a means for tracking how requirements have been satisfied bythe design model.• The design should not reinvent the wheel. Systems are constructed usinga set of design patterns, many of which have likely been encountered before.These patterns should always be chosen as an alternative to reinvention.Time is short and resources are limited! Design time should be invested inrepresenting truly new ideas and integrating those patterns that already exist.• The design should “minimize the intellectual distance”between the software and the problem as it exists in the real world.That is, the structure of the software design should (whenever possible)mimic the structure of the problem domain.• The design should exhibit uniformity and integration. A design is uniformif it appears that one person developed the entire thing. Rules of styleand format should be defined for a design team before design work begins. Adesign is integrated if care is taken in defining interfaces between designComponents.• The design should be structured to accommodate change. The designconcepts discussed in the next section enable a design to achieve this principle.• The design should be structured to degrade gently, even when aberrantdata, events, or operating conditions are encountered. Welldesignedsoftware should never “bomb.” It should be designed toaccommodate unusual circumstances, and if it must terminate processing, doso in a graceful manner.• Design is not coding, coding is not design. Even when detailed proceduraldesigns are created for program components, the level of abstraction ofthe design model is higher than source code. The only design decisions madeat the coding level address the small implementation details that enable theprocedural design to be coded.• The design should be assessed for quality as it is being created, notafter the fact.A variety of design concepts (Section 13.4) and design measures(Chapters 19 and 24) are available to assist the designer in assessing quality.• The design should be reviewed to minimize conceptual (semantic)errors. There is sometimes a tendency to focus on minutiae when the design isreviewed, missing the forest for the trees. A design team should ensure thatmajor conceptual elements of the design (omissions, ambiguity, inconsistency)have been addressed before worrying about the syntax of the design model.When these design principles are properly applied, the software engineer creates a designthat exhibits both external and internal quality factors . External quality factors are those properties of the software that can be readily observed by users (e.g., speed,reliability, correctness, usability).Internal quality factors are of importance to softwareengineers. They lead to a high-quality design from the technical perspective. To achieveinternal quality factors, the designer must understand basic design concepts.13.4 DESIGN CONCEPTSA set of fundamental software design concepts has evolved over the past four decades.Although the degree of interest in each concept has varied over the years, each hasstood the test of time. Each provides the software designer with a foundation fromwhich more sophisticated design methods can be applied. Each helps the softwareengineer to answer the following questions:• What criteria can be used to partition software into individual components?• How is function or data structure detail separated from a conceptual representationof the software?• What uniform criteria define the technical quality of a software design?M. A. Jackson once said: "The beginning of wisdom for a [software engineer] is torecognize the difference between getting a program to work, and getting it right". Fundamental software design concepts provide the necessary frameworkfor "getting it right."13.4.1 AbstractionWhen we consider a modular solution to any problem, many levels of abstraction canbe posed. At the highest level of abstraction, a solution is stated in broad terms usingthe language of the problem environment. At lower levels of abstraction, a more proceduralorientation is taken. Problem-oriented terminology is coupled with implementation-oriented terminology in an effort to state a solution. Finally, at the lowestlevel of abstraction, the solution is stated in a manner that can be directly implemented.Wasserman provides a useful definition:The psychological notion of "abstraction" permits one to concentrate on a problem atsome level of generalization without regard to irrelevant low level details; use of abstractionalso permits one to work with concepts and terms that are familiar in the problem environmentwithout having to transform them to an unfamiliar structure . . .Each step in the software process is a refinement in the level of abstraction of the software solution. During system engineering, software is allocated as an element ofa computer-based system. During software requirements analysis, the software solutionis stated in terms "that are familiar in the problem environment." As we movethrough the design process, the level of abstraction is reduced. Finally, the lowestlevel of abstraction is reached when source code is generated.As we move through different levels of abstraction, we work to create proceduraland data abstractions. A procedural abstraction is a named sequence of instructionsthat has a specific and limited function. An example of a procedural abstraction wouldbe the word open for a door. Open implies a long sequence of procedural steps (e.g.,walk to the door, reach out and grasp knob, turn knob and pull door, step away frommoving door, etc.).A data abstraction is a named collection of data that describes a data objectChapter12). In the context of the procedural abstraction open, we can define a data abstractioncalled door. Like any data object, the data abstraction for door would encompassa set of attributes that describe the door (e.g., door type, swing direction, peningmechanism, weight, dimensions). It follows that the procedural abstraction open wouldmake use of information contained in the attributes of the data abstraction door.Many modern programming languages provide mechanisms for creating abstractdata types. For example, the Ada package is a programming language mechanismthat provides support for both data and procedural abstraction. The original abstractdata type is used as a template or generic data structure from which other data structurescan be instantiated.Control abstraction is the third form of abstraction used in software design. Likeprocedural and data abstraction, control abstraction implies a program control mechanismwithout specifying internal details. An example of a control abstraction is the synchronization semaphore used to coordinate activities in an operating system.The concept of the control abstraction is discussed briefly in Chapter 14.13.4.2 RefinementStepwise refinement is a top-down design strategy originally proposed by Niklaus Wirth. A program is developed by successively refining levels of procedural detail.A hierarchy is developed by decomposing a macroscopic statement of function (aprocedural abstraction) in a stepwise fashion until programming language statementsare reached. An overview of the concept is provided by Wirth: In each step (of the refinement), one or several instructions of the given program are decomposedinto more detailed instructions. This successive decomposition or refinement of specificationsterminates when all instructions are expressed in terms of any underlying computeror programming language . . . As tasks are refined, so the data may have to be refined,decomposed, or structured, and it is natural to refine the program and the data specificationsin parallel.Every refinement step implies some design decisions. It is important that . . . the programmerbe aware of the underlying criteria (for design decisions) and of the existence ofalternative solutions . . .The process of program refinement proposed by Wirth is analogous to the process of refinement and partitioning that is used during requirements analysis. The differenceis in the level of implementation detail that is considered, not the approach.Refinement is actually a process of elaboration.We begin with a statement offunction(or description of information) that is defined at a high level of abstraction. Thatis, the statement describes function or information conceptually but provides no informationabout the internal workings of the function or the internal structure of theinformation. Refinement causes the designer to elaborate on the original statement,providing more and more detail as each successive refinement (elaboration) occurs.Abstraction and refinement are complementary concepts. Abstraction enables adesigner to specify procedure and data and yet suppress low-level details. Refinementhelps the designer to reveal low-level details as design progresses. Both conceptsaid the designer in creating a complete design model as the design evolves.《软件工程-实践者的研究方法》Roger S. Pressman博士(340页-343页)13.3 设计原则软件设计是一个过程也是一个模型。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
or number of enclosed areas + 1 In this case, V(G) = 4
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
2
What is a “Good” Test?
A good test has a high probability of finding an error
A good test is not redundant. A good test should be “best of breed” A good test should be neither too
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
1
Testability
Operability—it operates cleanly Observability—the results of each test case are readily
observed Controllability—the degree to which testing can be
5
Exhaustive Testing
loop < 20 X
14
There are 10 possible paths! If we execute one
test per millisecond, it would take 3,170 years to
test this program!!
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
simple nor too complex
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Chapter 15
Testing Conventional Applications
Slide Set to accompany
Software Engineering: A Practitioner’s Approach, 7/e
by Roger S. Pressman
Slides copyright © 1996, 2001, 2005, 2009 by Roger S. Pressman
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
10
Basis Path Testing
First, we compute the cyclomatic complexity: number of simple decisions + 1
11
Cyclomatic Complexity
A number of industry studies have indicated that the higher V(G), the higher the probability or errors.
modules
V(G)
modules in this range are more error prone
4
Test Case Design
"Bugs lurk in corners and congregate at boundaries ..."
Boris Beizer
OBJECTIVE to uncover errors
CRITERIA in a complete manner
CONSTRAINT with a minimum of effort and time
9
Why Cover?
logic errors and incorrect assumptions are inversely proportional to a path's execution probability
we often believe that a path is not likely to be executed; in fact, reality is often counter intuitive
typographical errors are random; it's likely that untested paths will contain some
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
8
White-Box Testing
... our goal is to ensure that all statements and conditions have been executed at least once ...
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
6
Selective Testing
Selected path
loop < 20 X
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
automated and optimized Decomposability—testing can be targeted Simplicity—reduce complex architecture and logic to
simplify tests Stability—few changes are requested during testing Understandability—of the design
(McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
7
Software Testing
white-box methods
black-box methods
Methods Strategies
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e
3
Internal and External Views
Any engineered product (and most other things) can be tested in one of two ways:
Knowing the specified function that a product has been designed to perform, tests can be conducted that demonstrate each function is fully operational while at the same time searching for errors in each function;