登陆注册
27082000000035

第35章 Software Engineering(5)

Separately query the database to check that the zero balance has been posted.

Exit the program with File->Exit.

Design 2

Setup: initialize the balance with a positive value.

Procedure:

Start the program on that account.

Withdraw all the money from the account using the 'all' button.

It's an error if the transaction happens without a confirmation popup.

Immediately thereafter:

-- Expect a $0 balance to be displayed.

-- Independently query the database to check that the zero balance has been posted.

The first design style has these advantages:

The test will always be run the same way. You are more likely to be able to reproduce the bug. So will the programmer.

It details all the important expected results to check. Imprecise expected results make failures harder to notice. For example, a tester using the second style would find it easier to overlook a spelling error in the confirmation popup, or even that it was the wrong popup.e

Unlike the second style, you always know exactly what you've tested. In the second style, you couldn't be sure that you'd ever gotten to the Withdraw dialog via the toolbar. Maybe the menu was always used. Maybe the toolbar button doesn’t work at all.

By spelling out all inputs, the first style prevents testers from carelessly overusing ****** values. For example, a tester might always test accounts with $100, rather than using a variety of small and large balances. (Either style should include explicit tests for boundary and special values.)x

However, there are also some disadvantages:

The first style is more expensive to create.o

The inevitable minor changes to the user interface will break it, so it's more expensive to maintain.

Because each run of the test is exactly the same, there's no chance that a variation in procedure will stumble across a bug.

It's hard for testers to follow a procedure exactly. When one makes a mistake -- pushes the wrong button, for example -- will she really start over?

Detail in the expected results is less problematic than in the test procedure, but too much detail can focus the tester's attention too much on checking against the script he's following. That might encourage another classic mistake: not noticing and exploring "irrelevant" oddities. Good testers are masters at noticing "something funny" and acting on it.

【New Words】

skimp

节约使用

elaborate

精心制作,详细阐述

omission

冗长

initialize

初始化

popup

弹出

procedure 程序,手续

confirmation 证实,确认,批准

script

手稿,原本,剧本

5.3 Software Maintenance

The term "software maintenance" is used to describe the software engineering activities that occur following delivery of a software product to the customer. The maintenance phase of the software life cycle is the time period in which a software product performs useful work. Typically, the development cycle for a software product spans 1 or 2 years, while tile maintenance phase spans 5 to 10 years.

Maintenance activities involve ****** enhancements to software products, adapting products to new environments, and correcting problems. Software product enhancement may involve providing new functional capabilities, improving user displays and modes of interaction, upgrading external documents and internal documentation, or upgrading the performance characteristics of a system. Adaptation of software to a new environment may involve moving the software to a different machine, or for instance, modifying the software to accommodate a new telecommunications protocol or an additional disk drives. Problem correction involves modification and revalidation of software to correct errors. Some errors require immediate attention, some can be corrected on a scheduled, periodic basis, and others are known but never corrected.

It is well established that maintenance activities consume a large portion of the total life-cycle budget. It is not uncommon for software maintenance to account for 70 percent of total software life cycle costs (with development requiring 30 percent). As a general rule of thumb, the distribution of effort for software maintenance includes 60 percent of the maintenance budget for enhancement, and 20 percent each for adaptation and correction.

If maintenance consumes 70 percent of the total life cycle effort devoted to a particular software product, and if 60 percent of maintenance goes to enhancing the product, then 42 percent of the total life cycle effort for that product is dedicated to product enhancement. Given this perspective, it is apparent that the product delivered to the customer at the end of the development cycle is only the initial version of the system. Some authors have suggested that the appropriate life-cycle model for software is development→evolution→evolution→evolution…

This perspective makes it apparent that the primary goal of software development should be production of maintainable software systems. Maintainability, like all high-level quality attributes, can be expressed in terms of attributes that are built into the product. The primary product attributes that contribute to software maintainability are clarity, modularity, and good internal documentation of the source code, as well as appropriate supporting documents.

It should also be observed that software maintenance is a microcosm of the software development cycle. Enhancement and adaptation of software reinitiate development in the analysis phase, while correction of a software problem may reinitiate the development cycle in the analysis phase, the design phase, or the implementation phase. Thus, all of the tools and techniques used to develop software are potentially useful for software maintenance.

同类推荐
  • 英语前缀词根后缀袋着走:英语单词这样背才对!

    英语前缀词根后缀袋着走:英语单词这样背才对!

    本书按照词首、词根、词尾的方法来教读者记忆单词,配合例句,迅速准确地掌握单词的用法。小开本的设计,方便读者携带,装到口袋里随时随地背单词。本书提供了标准的国际音标帮助你更好地将英语说出来。同时,大量实用的例句也可以让你将单词理解得更为透彻,从而掌握地道的表达方法。
  • 灵魂也有一席之地

    灵魂也有一席之地

    拥有信心,所有的事情才有可能成功。缺乏信心,即便是最微小的挑战,都会显得无法逾越,难以克服。本书收录的百则经典哲理美文,其内容涉及人生的方方面面,它们有的睿智凝练,让心灵为之震撼;有的灵气十足,宛如一线罅隙中奔涌而出的清泉,悄然渗入心田。
  • 澳大利亚学生文学读本(套装1-6册)

    澳大利亚学生文学读本(套装1-6册)

    从最简单入门的英语句式、拼写与发音开始,并且附有大量插图,通过趣味而有教育意义的故事,引发孩子们学习语言的兴趣;并向规范、美丽的文学作品过渡,让孩子们掌握语言的艺术,感受本国的人文历史。是中国学生学习英语、全面了解西方社会的很好途径。
  • 英语PARTY——袋鼠之国·澳大利亚

    英语PARTY——袋鼠之国·澳大利亚

    本套书籍带你领略英语世界风景,感悟英语学习氛围,有助于英语学习。
  • 伊索寓言(有声双语经典)

    伊索寓言(有声双语经典)

    《伊索寓言》的作者相传是公元前6世纪古希腊的寓言故事家伊索,在这些故事的流传过程中,不断有其他来源的寓言故事加入,但最终都归于伊索名下。两千多年来,《伊索寓言》逐渐从欧洲传遍世界,故事中的素材不仅成为许多固定俗语,例如龟兔赛跑、农夫和蛇、狐狸和葡萄等,围绕这些故事还产生了许多文学、戏剧、音乐等艺术作品,成就了一部全世界家喻户晓的寓言故事集。在我国,《伊索寓言》是“初中语文新课标课外阅读书目”中的选书,其中的名篇《狐狸和葡萄》《牧童和狼》《蝉和狐狸》入选小学语文课本;《赫尔墨斯和雕像者》《蚊子和狮子》入选初中语文课本。
热门推荐
  • 怖客之午夜孤魂

    怖客之午夜孤魂

    我叫许长生,因为我来到人世的时候上天跟我开了个玩笑,我有了常人没有的能力,我有着常人没有的阴阳眼。就因为有着天生的阴阳眼,所以继承了奶奶祖传下来的茅山术,每天过着非活非死的生活,我坚持把符气修炼强大,改变自己的命运!
  • 韩娱大明星

    韩娱大明星

    美籍韩裔的林在贤一个意外走进了韩国娱乐圈,在这名利场里面,他任性,他风流,他潇洒,玩转韩娱无极限。九只什么鬼,T-ARA才是我们的最爱。打造新一代的T-ARA才是最重要的,登顶?不要太简单……以完本作品‘篮球娱乐天王’‘纵横好莱坞’请放心收藏。
  • 许你一方净土

    许你一方净土

    爱是错觉,若执为实有,往往会生出恨。恨是假象,若解开心结,慢慢会转成爱。她八卦的说:“这男人就是个妖孽,妖孽自有天来收。”他咬牙切齿说:“死女人,有胆子就来替天行道。”在唐润以为恨的时候,爱已经悄悄打开了他的心扉。时光洗净迷障,他带她走进那栋洋房。他说:“房子还缺个女主人,你来怎么样?”她却说:“哈哈,老板,……这是我的结婚证。”一个是玩转垃圾的美女学霸,一个是心狠手辣的传奇总裁,一个是流氓本质的精神病专家。谁是谁的前缘,谁是谁的宿债?是日已过,命亦随减,如少水鱼,斯有何乐。这世间,最浪漫的事,不是爱情里的生死相随一生苦等。这世间最浪漫的事,是牵你的手,领你到轮回的渡口,如果你迷路了,走丟了,不论历经多少世,也要找你回来。
  • 侠道至终

    侠道至终

    江湖上侠客众多,但他们能带来什么?只需要轻轻的一个动作,故事就会偏离原本的轨迹。谁能笑傲江湖,中土九界任人纵横。一个过客,将会留下自己的印记。
  • 语文新课标课外必读第九辑—一苦儿流浪记

    语文新课标课外必读第九辑—一苦儿流浪记

    国家教育部颁布了最新《语文课程标准》,统称新课标,对中、小学语文教学指定了阅读书目,对阅读的数量、内容、质量以及速度都提出了明确的要求,这对于提高学生的阅读能力,培养语文素养,陶冶情操,促进学生终身学习和终身可持续发展,对于提高广大人民的文学素养具有极大的意义。
  • 岁月的解药无处寻觅

    岁月的解药无处寻觅

    高中的时候日子很长,每天读书写字,大部分时间都是待在学校。如果没有这些有趣的事,该如何度过这漫长的岁月呢?类似高中回忆录,事件真实,记录一下我还算精彩的高中时光。
  • 如玉志

    如玉志

    当兵后悔两年,不当兵后悔一辈子,本书将带你进入一个另外的世界,从军报国,使大汉帝国屹立于世界之巅。四方来贺,八方来拜!
  • 穹尽天裂

    穹尽天裂

    苍穹之大,宇宙之广,无边无际,没有人能说的清它的边际在哪里,甚至没有人知道宇宙到底有没有边际。似乎宇宙早以成为了不可超越的存在。然而在宙中却一直流传着一个古老的传说,曾经有一种生命,他超越了宇宙,超越了终极极限,达到了苍穹无极之境,这种生命便是人类。
  • 天行

    天行

    号称“北辰骑神”的天才玩家以自创的“牧马冲锋流”战术击败了国服第一弓手北冥雪,被誉为天纵战榜第一骑士的他,却受到小人排挤,最终离开了效力已久的银狐俱乐部。是沉沦,还是再次崛起?恰逢其时,月恒集团第四款游戏“天行”正式上线,虚拟世界再起风云!
  • 我的网红女木匠

    我的网红女木匠

    那年,她在学校超市的电视机里看到采访他的新闻。惊鸿一瞥,未知全名。遇见那天,他在博物馆门口遇到一个问是否在等她的女生,颜值高,打扮的却像逛超市的大婶般普通。此后,他的隐藏技能逐渐显露,最大的爱好就是帮女朋友买买买。如果爱情像是在看一条鱼,他知道她是否欢喜。网红女木匠VS文物修复师