《软件质量属性》PPT课件.ppt
《《软件质量属性》PPT课件.ppt》由会员分享,可在线阅读,更多相关《《软件质量属性》PPT课件.ppt(141页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、质量属性Quality Attribute1主要内容n一、质量属性场景n二、理解质量属性n三、实现质量属性的战术n四、设计架构2质量属性的定义nA quality attribute(QA)is a measurable or testable property of a system that is used to indicate how well the system satisfies the needs of its stakeholders.l质量属性是一个系统的可测量或可测试的属性,它被用来描述系统满足利益相关者需求的程度n本章任务l怎样描述质量属性l怎样达成质量属性l怎样应用质
2、量属性(在架构决策时)3系统的架构、功能和质量属性n软件开发时人们往往关注功能l实情:导致软件系统修改的主因不是功能,而是系统难以维护、扩展、被黑客破坏等。n系统的功能不能决定系统的架构n质量是系统的属性,而功能是系统的目标4构架和质量属性之间的关系n质量属性不完全依赖于设计、实现和部署l易用性涉及构架和非构架两方面的问题-系统能否为用户提供取消操作?这一类属于构架层次的问题-什么样的布局最直观?什么样的字体最清晰?这属于详细设计的部分,不属于构架设计。l可修改性:-划分功能的方式这属于架构层次的问题-模块中的编码技巧非架构层次问题l系统性能:-组件间通讯数量、分配给每个组件的功能、资源共享的
3、方式,等,这些都属于架构层次的问题-实现某功能采用的算法、如何编码这些算法,等,都会影响系统性能,但属于非构架层次的问题。5构架和质量属性之间的关系n构架不能独自实现质量属性l构架为质量属性的实现打下了基础,但不关注实现细节的话,这个基础就失去了意义。n复杂系统中,不能孤立地实现质量属性l例如,为了可靠性,增加冗余处理器和进程,保证不会因单点故障使系统崩溃。但这样对安全性不利,系统会有更多的地方可能会遭到入侵6质量属性的来源:3类需求n1.Functional requirements lThese requirements are satisfied by including an appr
4、opriate set of responsibilities within the design.n2.Quality attribute requirements lThese requirements are satisfied by the structures and behaviors of the architecture.n3.Constraints:a design decision thats already been made.lsatisfied by accepting the design decision and reconciling it with other
5、 affected design decisions.7描述质量属性需求的6个部分n刺激stimulusl是到达系统的事件eventn刺激源stimulus sourcel生成刺激的实体(计算机、人-可信或不可信)n响应responsel刺激到达后采取的反应n响应度量response measurel对响应效果进行度量n环境:l刺激发生时的各种条件n制品:l可能是系统,或系统的一部分核核心心8用如下方式描述质量属性场景刺激源刺激源刺激刺激环境环境响应响应响应度量响应度量制品制品9质量属性的一般场景10可用性场景的一个例子外部外部系统系统未曾未曾预料预料的消的消息息正常正常操作操作进程进程通知操
6、通知操作员继作员继续操作续操作没有停机没有停机11可修改性场景的一个例子开发开发人员人员希望希望改变改变用户用户界面界面设计时设计时代码代码修改不修改不产生副产生副作用作用3小时内小时内12一、质量属性场景13我们通常考虑如下质量属性n系统质量属性l可用性Availabilityl可修改性l性能l安全性l可测试性l易用性n其他如商业属性(上市时间)、概念属性等,在本课程中不讨论14可用性AvailabilitynAvailability refers to the ability of a system to mask or repair faults such that the cumula
7、tive service outage period does not exceed a required value over a specified time intervaln可用性,通常关注如下方面:l系统故障发生的频度、出现故障时会发生什么情况(会出人命吗)、允许系统非正常运行多久、如何防止故障发生、发生故障时通知给哪里,等n区分故障failure错误error过错、责任faultl故障产生的原因即过错责任lFault和failure之间的状态,称之为errorl如果不进行纠正,错误会变成故障l用户可以观察到故障、但看不到错误15可用性Availabilityn通常,将可用性定义为l
8、 平均正常工作时间平均正常工作时间(MTBFMTBF)l平均正常工作时间平均正常工作时间(MTBF)(MTBF)+平均修复时间平均修复时间(MTTR)(MTTR)l不计算正常停机时间不计算正常停机时间lwhere MTBF refers to the mean time between failures and where MTBF refers to the mean time between failures and lMTTR refers to the mean time to repair.MTTR refers to the mean time to repair.=16Hazar
9、d analysis:is a technique that attempts to catalog the hazards that can occur during the operation of a system.nCatastrophic灾难性lThis kind of failure may cause a crash.This failure represents the loss of critical function required to safely fly and land aircraft.nHazardous有危险lThis kind of failure has
10、 a large negative impact on safety or performance,or reduces the ability of the crew to operate the aircraft due to physical distress or a higher workload,or causes serious or fatal injuries among the passengers.nMajor显著lThis kind of failure is significant,but has a lesser impact than a Hazardous fa
11、ilure(for example,leads to passenger discomfort rather than injuries)or significantly increases crew workload to the point where safety is affected.nMinor 不显著lThis kind of failure is noticeable,but has a lesser impact than a Major failure(for example,causing passenger inconvenience or a routine flig
12、ht plan change).nNo effect 无影响lThis kind of failure has no impact on safety,aircraft operation,or crew workload.17A simple fault tree18Availability General Scenario19可用性的战术20Detect Faults错误检测-1nPing/echol节点间的异步“请求/回应”信息。检测可达性和往返延迟nMonitorl一个用来监视系统其他部分的组件nHeartbeatl监测者和被监测者之间交换的周期性信息nTime stampnSanit
13、y checking健全性检查l某项操作或输出的合理性nCondition monitoringnVoting(TMR)nReplication:防止硬件错误,但避免不了逻辑错误nFunctional redundancy功能性冗余l防止设计或实施时的错误l接收相同的输入,要给出相同的输出。但其内部实现要用不同的方法Detect Faults错误检测-2nAnalytic redundancyl不仅限于组件的私有部分的多样性,而且在输入和输出方面也实现多样性。nException detectionlSystem exceptions:被0除、总线地址失效等lParameter fence:防
14、止对象的参数被覆盖lParameter typing 参数限制ltimeout22Recover from FaultsnActive redundancy(hot spare热备份)nPassive redundancy(warm spare暖备份)nSpare(cold spare冷备份)nException handlingnRollbacknSoftware upgradenRetrynIgnore faulty behaviornDegradationnReconfigurationnShadownState resynchronizationnEscalating restartl
15、逐步重启nNon-stop forwarding(NSF)l直通23Prevent FaultsnRemoval from servicenTransactions事务lAtomic,Consistent,Isolated,and DurablenPredictive modelnException preventionnIncrease competence set 扩充能力集合lis the set of states in which it is“competent”to operate.24A Design Checklist for Availability-125A Design
16、Checklist for Availability-226A Design Checklist for Availability-327A Design Checklist for Availability-428互操作性InteroperabilitynInteroperability is about the degree to which two or more systems can usefully exchange meaningful information via interfaces in a particular context.29互操作性一般场景30一个互操作性示例3
17、1互操作性战术32Checklist to Support the Design and Analysis Process for Interoperability33Checklist to Support the Design and Analysis Process for Interoperability-234Checklist to Support the Design and Analysis Process for Interoperability-335可修改性Modifiabilityn什么可以改变?l系统的任何部分:功能、平台、环境、质量、容量n何时修改、由谁来修改?n修
18、改的代价36可修改性一般场景37可修改性场景的一个例子38可修改性战术39性能Performance:An ounce of performance is worth pounds of promises.n性能最相关的即:时间40Sample concrete performance scenario一个具体的性能属性场景41性能属性的战术42A Design Checklist for Performance43A Design Checklist for Performance-244A Design Checklist for Performance-3安全性Security:衡量系统
19、在向合法用户提供服务的同时,阻止非授权使用的能力nconfidentiality,integrity,and availability(CIA)lConfidentiality is the property that data or services are protected from unauthorized accesslIntegrity is the property that data or services are not subject to unauthorized manipulationlAvailability is the property that the sys
20、tem will be available for legitimate use.lAuthentication verifies the identities of the parties to a transaction and checks if they are truly who they claim to belNonrepudiation guarantees that the sender of a message cannot later deny having sent the message,and that the recipient cannot deny havin
21、g received the messagelAuthorization grants a user the privileges to perform a task46安全性一般场景147安全性一般场景248一个安全性场景实例49安全性战术50安全性设计清单151安全性设计清单252安全性设计清单353可测试性testability:Testing leads to failure,and failure leads to understandingn通过测试揭示软件缺陷的容易程度l在开发设计良好的系统成本中,至少有30-50%用在了测试上。l测试由各种开发人员、测试人员、验证人员、用户进行
22、。l对设计、代码、整个系统进行测试54可测试性的通用场景55一个可测试性的实例56可测试性的战术57可测试性的设计策略清单-158可测试性的设计策略清单-259可测试性的设计策略清单-360易用性Usability:it takes a genius to make something simple.n对用户来说,完成某个期望任务的容易程度和系统所提供的用户支持的种类。l许多易用性问题属于质量属性l系统构建完成后,最难添加的特性,往往属于架构内容l关于什么是架构方面的内容、什么不是,往往基于对问题的表面分析;深入分析会发现:到处都有应该在架构方面考虑的问题。61易用性一般场景62一个易用性场景
23、实例63易用性战术64易用性设计策略65易用性设计策略-2其他质量属性nVariability可变性l特殊的可修改性lIt refers to the ability of a system and its supporting artifacts such as requirements,test plans,and configuration specifications to support the production of a set of variants that differ from each other in a preplanned fashion.l用于软件产品线的维护
24、nPortabilityl易于做改变,用于另外一种平台其他质量属性nDevelopment Distributabilityl支持分布式软件开发nScalabilitylhorizontal scalability-adding more resources to logical unitslvertical scalability-adding more resources to a physical unitnDeployability可部署性nMobilityldeals with the problems of movement and affordances of a platfor
25、m(大小、显示器类型、输入设备类型、带宽、电池等)68其他质量属性nMonitorabilityldeals with the ability of the operations staff to monitor the system while it is executing.nSafetylSoftware safety is about the softwares ability to avoid entering states that cause or lead to damage,injury,or loss of life to actors in the softwares e
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 软件质量属性 软件 质量 属性 PPT 课件
限制150内