資源描述:
《防不勝防的軟件錯誤——例11963年,美國,飛往火星的》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、防不勝防的軟件錯誤——例1:1963年,美國,飛往火星的火箭爆炸,損失$10million.原因:FORTRAN循環(huán)DO5I=1,3誤寫為DO5I=1.3第七章測試(Testing)例2:1996年,美國WashingtonPost報導(dǎo)Dallas,Aug.23—ThecaptainofanAmericanAirlinesjetthatcrashedinColombialastDecemberenteredanincorrectone-lettercomputercommandthatsenttheplaneintoamountain,theairlinesaidtoday.第七章測試
2、.Thecrashkilledallbutfourofthe163peopleaboard.American’sinvestigatorsconcludedthatthecaptainoftheBoeing757apparentlythoughthehadenteredthecoordinatesfortheintendeddestination,Cali.ButonmostSouthAmericanaeronauticalcharts,theone-lettercodeforCaliisthesameastheoneforBogota,132milesintheoppositedir
3、ection.ThecoordinatesforBogotadirectedtheplanetowardthemountain,accordingtoaletterbyCecilEwell,American’schiefpilotandvicepresidentforflight.ThecodesforBogotaandCaliaredifferentinmostcomputerdatabases,Ewellsaid.例3:[摘自Pfleeger書中的“REAL-TIMEEXAMPLE”]Ourreal-timeexampleisbasedontheembeddedsoftwarein
4、theAriane-5,aspacerocketbelongingtotheEuropeanSpaceAgency(ESA).OnJune4,1996,onitsmaidenflight,theAriane-5waslaunchedandperformedperfectlyforapproximately40seconds.Then,itbegantoveeroffcourse.AtthedirectionofanArianegroundcontroller,therocketwasdestroyedbyremotecontrol.Thedestructionoftheuninsure
5、drocketwasalossnotonlyoftherocketitself,butalsoofthefoursatellitesitcontained;thetotalcostofthedisasterwas$500million.第七章測試.第七章測試.Thebusinessimpactoftheincidentwentwellbeyondthe$500millioninequipment.In1996,theAriane-4rocketandpreviousvariantsheldmorethanhalfoftheworld’slaunchcontracts,aheadofAm
6、erican,Russian,andChineselaunchers.Thus,thecredibilityoftheprogramwasatstake,aswellasthepotentialbusinessfromfutureArianerockets.Cause:TherewasnodiscussionintheSRI(InertialReferenceSystem)requirementsdocumentsofthewaysinwhichtheAriane-5trajectorywouldbedifferentfromAriane-4.軟件測試是保證軟件質(zhì)量的關(guān)鍵步驟,是對軟件
7、規(guī)格說明、設(shè)計和編碼的最后復(fù)審,其工件量約占總工作量40%以上(對于人命關(guān)天的情況,測試相當(dāng)于其它部分總成本的3—5倍)。第七章測試.§1.基本概念1、定義:測試是為了發(fā)現(xiàn)程序中的錯誤而執(zhí)行程序的過程。注意:①只能盡可能查錯,不能證明程序中沒有錯;②測試員與程序員不應(yīng)是同一個人。2、黑盒和白盒測試?黑盒測試(black-box,orclosed-boxtesting):Makesurethateverykindofinputissubmitte