登陆注册
23770800000035

第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.

同类推荐
  • 生活英语会话想说就会说

    生活英语会话想说就会说

    看到26个字母就鸭梨山大?还是在死磕“哑巴英语”?别担心,本书将生活和英语结合起来,让您在生活中轻轻松松学习英语。其中内容涉及生话英语交流中的各种典型场景。从爱情婚姻、生活起居、购物天地,食全食美、家庭理财、医院就医、家庭汽车、谈天说地和社会问题等方面来展现生活休闲过程中的各种真实情景,所选题材齐全,语言简洁明快,易学好记,实用性强。
  • 双语学习丛书-爱的交融

    双语学习丛书-爱的交融

    流淌心灵的隽语,记忆的箴言,在双语的世界里,感受英语学习的乐趣,体会英语学习的奥妙,提高英语学习的能力!丛书包括:爱的交融、财富精英、成长课堂、醇香母爱、父爱如山、故乡情怀、节日趣闻、快乐心语、浪漫往昔等故事。
  • 职场商务英语看这本就够

    职场商务英语看这本就够

    本书分为职场办公篇和商务篇两大部分,包含100余个模拟场景,近千个对话。场景对话只精选最常用的句型,让你学以致用,拿起就会说。职场商务英语并不可怕,只要每天学习一点本书的内容,你就会发现其实职场英语很简单。想要成为职场英语达人,本书一本到位,看这本就够了。
  • 从Hello到玩转英语

    从Hello到玩转英语

    本书从生活中最常用的英语短句到模拟场景会话,循序渐进。本书亮点在于常用短句大全,重点则在场景会话部分。场景会话部分包含135个模拟情景,每个情景后都附有欧美文化介绍。语言与文化同步学习,掌握最地道英语。
  • 聆听花开的声音

    聆听花开的声音

    阅读《聆听花开的声音》,你可以感受到田野上的清风,可以找到心灵宁静的港湾,可以发现生活中被人们忽略的真理,从而拥有一颗宽广的心,走向成功……感受英语的魅力!体验英语的快乐!当鲜花盛开时,我们会沉醉在花海中,为它们的美丽、娇艳赞叹不已,但你可知道它们的真正动人之处,在于它从含苞待放走向盛开的那一刹那。聆听花开的声音,默默感受鲜花盛开过程中的美丽。
热门推荐
  • 萧萧落叶送残秋

    萧萧落叶送残秋

    主人公逍遥背负使命追杀外星生物,不幸飞船撞上了陨石,流落他乡。
  • 蔷薇缭乱之学院风云

    蔷薇缭乱之学院风云

    高端大气上档次的蔚夜贵族学院分为“东庭”和“西侍”,两大学区各自为阵、各有一位统领、各有一方拥趸说服郝好加入他们的阵营。决定走为上策的郝好一路迷迷糊糊找不到出走方向之际,却惊讶地发现这所贵族学院其实是吸血鬼的聚集地?而一切谜团都伴随着郝好的身世,郝好究竟是谁?蔷薇花开正艳迷人眼,人类与血族情感交织,黑夜与白昼共同谱写的协奏曲!神秘而引人注目,危险且魅惑无限,蔷薇缭乱,拨乱的是你的心上之弦!
  • 迷界龙影

    迷界龙影

    姜雾等一众人,新世纪的科学狂人,为了证实猜想的科学性。恰逢东方苍龙七宿异变。毅然走上了寻找真龙的道路。古镇、水底、星空等,都留下了他们的脚印。无论有多少的未解之谜,多大的困难险阻。都无法阻挡他们追求神龙的道路。(本故事纯属虚构,如有雷同,纯属巧合。)
  • 上古世纪龙之纪元

    上古世纪龙之纪元

    战大陆霸主,破神族封印,撕裂整个第七世界规则!踏上真神路,成就不朽魂!万代纪元之争终于我手!感谢腾讯文学书评团提供书评支持!
  • 天庭福利群

    天庭福利群

    陈浩网购的二手手机,里面居然有一个天庭福利群,各路大神疯狂发红包,还有一个天庭商店,武技功法、丹药宠物、兵器法宝,应有尽有!普通大学生陈浩,就这样踏上了奇葩的修仙之路。
  • 异能狂妻:美夫难追

    异能狂妻:美夫难追

    莫名其妙被一个牛皮糖一样的家伙黏上怎么办?扇槿看着尾随其后的某男,万分头疼。“能甩就甩,甩不了就跑呗。”顶着与扇槿一模一样的冰莲悠悠的往嘴里扔了一颗葡萄。“好吃好喝,把他吃穷了就踢走。”秦式眨了眨他漂亮的丹凤眼,朝扇槿抛了个媚眼。“打一顿扔青楼里去。”阿黑立刻支招。可关键问题是,他没有那么好甩的啊!扇槿泪奔……【情节虚构,请勿模仿】
  • tfboys之王子遇上公主

    tfboys之王子遇上公主

    我不是四叶草,只是看了太多书手痒了,我每个星期至少更一章,如果你认为写的不好请不要骂我。
  • 无敌宝宝:爹地,妈咪不嫁你

    无敌宝宝:爹地,妈咪不嫁你

    我们去撞车吧!一次车祸带了的爱的奇遇的开端。她为了他变成了痴傻的孩童。“哥哥也要成为幸福的人哦!”某女说着给某男把戒指戴上了。有时候又不是注定的,要不然,为什么你会离我而去?“好好照顾她。”某男说完就挂上了电话。有时候注定在一起,却又不肯面对自己内心。
  • 七零八落

    七零八落

    酒店职员王哲是个乐观、单纯的年轻人,每天重复着单调的工作,一次偶然的机会,他遇到了性格外向的方炜,此后,他的生活添加了新的色彩,他终于从禁闭自己的空间里走出来,和方炜并肩开始了一段有趣、诙谐的创业故事……
  • 旧爱新婚,高冷前妻很抢手

    旧爱新婚,高冷前妻很抢手

    三年婚姻,苏婉忍受自己的丈夫与旧爱藕断丝连,李欣然的设计陷害,让她陷入抄袭风波,而她的丈夫指着她的鼻子大骂她是第三者!名存实亡的婚姻令她心力交瘁,原来费尽心机得到的,不过是一场残酷的梦。离婚之后,她在职场大放光芒,原本瞧不上她的前夫却厚着脸皮贴上来,不仅破坏她的相亲,还搅黄了她的约会,厚颜无耻,“你还欠我一个孩子!”