登陆注册
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.

同类推荐
  • 葛传椝英文书信序言选编

    葛传椝英文书信序言选编

    《葛传椝英文书信序言选编》所收文章出自《葛传椝英文集(三)》,包括葛传椝先生用英语撰写的书信、序言等共27篇。文后保留了葛先生当年的注释,便于读者阅读。
  • 双语学习丛书-财富精英

    双语学习丛书-财富精英

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

    大学英语四级阅读技巧

    全书共涉及以下五个方面的内容:阅读理解概述、阅读理解解题技巧、四级阅读题型模式、历年阅读理解真题详解、全真预测试题。书中比较系统地介绍了阅读方法、技巧,帮助广大考生提高阅读能力,掌握临场解题技法,在进一步提高考生的应试能力的同时更能使其语言的综合能力稳步提升。
  • 王子与贫儿(双语译林)

    王子与贫儿(双语译林)

    《王子与贫儿》描写了王子爱德华和贫儿汤姆通过一个偶然的机会,阴差阳错地互换了位置,王子变成了贫儿,贫儿变成了王子的故事。汤姆当上了英国的新国王,而真正的王子爱德华却在外四处流浪。在好人霍顿的帮助下,爱德华王子经历了重重劫难,最终回到王宫。而贫儿汤姆在良心的谴责下,将不属于自己的皇位还给了真正的王子。此后,爱德华成了一位仁慈的君主,和他的子民一起过着幸福的生活。
  • 英语PARTY——蓝色天堂·意大利

    英语PARTY——蓝色天堂·意大利

    本套书籍带你领略英语世界风景,感悟英语学习氛围,有助于英语学习。
热门推荐
  • 欲往相依兮碎了梦中图画

    欲往相依兮碎了梦中图画

    庄周摇身一变,变成风度翩翩的楚王孙,来吊唁恩师,田秀对此却一无所知!
  • 快穿大佬她总在玩心跳

    快穿大佬她总在玩心跳

    【真·相爱相杀文,剧情很狗,第一章有排雷,看完排雷再决定要不要看么么哒~】星际大佬一朝狗带,喜提反派拯救系统。系统:“偏执总裁、伪善国师、残暴魔君……亲爱的宿主,快用爱与正义感化他们吧!”步天歌点起一支烟,烟斜雾横间轻轻启唇:“你自诩反派拯救系统,那我问你,你知道拯救反派,最好的方法是什么吗?”系统:?“干掉他,这个反派我来当。”系统:“淦!宿主您冷静一点!!!”#宿主今天也干掉反(男)派(主)了呢##暗黑向##两个凶残反派的相爱相杀日常#
  • 真的不是怂

    真的不是怂

    我真的不是怂,只是小心谨慎而已,真的,真的,真的,重要的事情说三遍。
  • 天行

    天行

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

    江湖如是

    人生如戏,戏在江湖全靠演。赢来名盛满堂彩。败走势衰一地血,真正的江湖,是残酷污秽的世界。
  • 全职法师之神级拾取

    全职法师之神级拾取

    来到全职法师的世界,开局荣获神级拾取系统。珠穆朗玛峰上冰雪神宫傲立于当世,崛起之势,不可阻挡。龙虎山天师府雷法传承现世,雷系法师为之痴狂。五岳之首泰山惊现千年帝宫,一切都充满着未知。
  • 我家媳妇超赞哒

    我家媳妇超赞哒

    他说:“我喜欢你是与日俱增。”她说:“我喜欢你是认真的。认真地,漫长地一直喜欢下去。”不就是看上了打小护着她的慕容哥哥嘛!既然小时候都这么护着她,那就得护她一辈子。都说女追男隔层纱,那她就早早把这层纱给捅了。没事耍点小计谋,逗一逗,撩一撩,可她终极大招还没用,某人就大吃飞醋,这也醋醋,那也醋醋。后来更是反道而行之,开始宠妻无下限……阅读指南:日常显摆、虐狗、撩妻、没事拌个嘴、斗斗气,亲亲抱抱举高高。
  • 逃之夭夭,萌妃要翻墙

    逃之夭夭,萌妃要翻墙

    秋颖彤每次回头看自己的人生的时候,都觉得这就是一个闹剧。靠,她都已经逃婚了,却误打误撞的又碰上了。和君清落的那些乱七八糟的事情,她一直很怀疑,那是不是传说中的,人倒霉了,喝水都能塞牙缝。她真的不想要他的,可是为什么老天爷一定要把他扔给她呢?她第n次决定,以后再也不求老天爷,打死也不求他了……
  • 绵中赋

    绵中赋

    身着青衣三层,手持雅扇掩面,小酌一杯,笑看风月,任凭青丝随风飘飞……不愧是青枫浦首席弟子,风中凌乱都这么有格调。去你的斯文败类!呸,做人就是要讲究。当面对小盆友们时,没有什么是一段鸡汤解决不了的。当面对boss时,没有什么是一波走位解决不了的。当面对师弟时,亲亲抱抱举高高?解决不了了?
  • 这片废土归我管

    这片废土归我管

    公元3075年,人类与缪斯文明在人类的大本营——地球,展开决战,人类惨败,缪斯文明启动了“人类大清洗计划”对地球实施了核打击,百分之九十八的人类因此丧生,地球变成了一片废土,幸存者能否在这片土地上让人类的文明复兴?