八文_文档搜索
 
设为首页   |  加入收藏夹
 八文网 - 汇聚八方文档 - 做最优秀的免费文档下载网站
 

软体测试架构

文档类型: Microsoft PowerPoint PPT 演示文稿 文档大小:2.06M
JUnit 软体测试架构JUnit Software Testing Framework叶秉哲200274.JUnit 的定位自动产生手动产生test case部份手写工具骨干,架构单元测试JUnit is.方level整合测试scope全自动完整系统JUnit is not.test driver scripttestware大纲引子JUnit 基础篇JUnit 进阶篇软体测试基础推荐读物
一、引子一流的科学家可以做出很有价值的实验、产生新知识;二流科学家只是忙於各种实验、0集大量数据,但对知识的累积没什0用处.
- David SalsburgJUnit 简介Regression testing framework written by Erich Gamma and Kent BeckOpen SourceHosted on Java,C,Perl, Python, etc.
IDE VisualAge, etc.What is Software TestingThe execution of code using combinations of input and state selected to reveal bugs.
The process of devising and executingatest suite that attempts to cause failures, increasing our confidence that failures are unlikely.
Why Testing
目的:矛与盾
Reveal bugs: quality control
Confidence: qualitative quantitative重要性Paradigm↑productivity↑testing debugging↑Software features that cant be demonstrated by automated tests simply dont exist. [Beck 1999, p.45]
Testing:CMM PerspectiveThe Key Process Areas by Maturity Level
Source: Capability Maturity Model for Software, v1.1
Testing: RUP Perspective
Source: Philippe Kruchten, The Rational Unified Process: An Introduction, p.62, Addison Wesley, 1998.
Testing: XP PerspectiveIf youre not validating everything all the time,youre not doing XP. Period.
Source: Kent Beck, Extreme Programming Explained: Embrace Change, p.70, Addison Wesley, 1999.
Test WhatEvery artifact during the whole development process should be tested.
软体测试工具分类 Suite Optimizeitlint实例coverage analysistest case testingtest planningtest execution design development分类JUnit FrameworkHow to Test with 如何测试strategy多少测试才够coverage流程process工具影响medium is message
二、JUnit 基础篇Extreme Programmers test everything that could possibly break, using automated tests that must run perfectly all the time.
- Extreme Programming Goals of JUnitEasy to useRequires no more work than absolutely necessary to writeanew testLeverages existing tests to create new onesReusable fixtures to run different testsRetains values of tests over timeCombines tests from various authors and run them together without fear of Study自动产生测试框架Using Borland JBuilder 6.0最简单的完整测试实例实例一
实例一:简单的待测物public class Money {private int fAmount;private String fCurrency;public Money(int amount, String currency) {fAmount = amount;fCurrency = currency;}public Money add(Money m) {return new Money(amount m.amount, currency);
public int amount { return fAmount; }public String currency { return fCurrency; }
实例一:产生测试框架[17]Borland JBuilder 6.0
实例一:产生测试框架[27]
实例一:产生测试框架[37]
实例一:产生测试框架[47]
实例一:产生测试框架[57]
实例一:产生测试框架[67]
实例一:产生测试框架[77]import ;public class MoneyTest extends TestCase {public MoneyTest (String s) { super(s); }protected void setUpprotected void tearDownpublic void testAdd {String val2 = STRING0;Money money = new Money(val1, val2);
Money val1 = null @todo fill in non-null value ;
Money moneyRet = ;
@todo: Insert test code here.Use assertEquals, for example.Lesson testalittle实例二
1.
实例二:待测物,修正版public class Money implements Cloneable {public Money(int amount, String currency) { . }if (m = null) return (Money) clone;
public Object clone { . }public boolean equals(Object obj) { . }public int amount { . }public String currency { . }
实例二:测试码[12]public void testNullAdd {String curr = NTD;Money money1 = new Money(val1, curr);
Money money2 = null; null valueMoney money3 = ;
money3);
实例二:测试码[22]public void testSimpleAdd {Money money2 = new Money(val2, curr);
new Money(val3, curr));
java -cp lib\junit.jar. 12Failure 22Lessons exercise test case(s)Write vs. error
三、JUnit 进阶篇The tests that you write in XP are isolated and automatic.
- Extreme Programming 管理Test suite 与进入点Grouping by testing实例三setUptearDown
实例三:测试码[12]private Money money1, money2, money3;
public s) { . }protected void setUp {
实例三:测试码[22]public void testNullAdd {Money money10 = ; null money10);Money money10 = ;
money10); setUpOverrides tearDownEach test.method is isolated实例四TestSuitetest suite
实例四:测试码[13]public MoneyTest (String s) { . }protected void setUp { . }public void testNullAdd { . }public void testSimpleAdd { . }
实例四:测试码[23]
[interactive mode]entry point of the whole test suite!
Version 1public static Test suite {TestSuite suite = new TestSuite;
;
;
return suite;Version 2return new ;
实例四:测试码[33]
[batch mode]public static void main(String args) {;
Test case as the interactive mode entry as the batch mode entry point
实例五:Composite Pattern
实例五:before groupingtest 1test 2test 3
实例五:grouping by tasksbasic testrandom testmonkey teststress test
实例五:composite test suitespublic class Money_test extends TestCase {;
;
;
Grouping by configuration policyBy tasksBy personsBy
小结:JUnit 使用四部曲Overrides setUp andor test.Uses suite andor main其他主题 for various application domains
四、软体测试基础Program testing can be used to show the presence of defects, but never their absence!
- Edward DijkstraWhy is Hard理论限制实务限制成本流程人因
软体测试方:分类ScopeUnit testSystem testAcceptance (black (white box)Hybrid (gray Testing Manifesto观察No silver bulletEvery advance incremental信条Fault modelsTest processFault testing 不可能,合理的testing strategy 必须根据fault models 的引导
正面: sufficient
反面: efficient
五、推荐读物Tests are botharesource
软体测试通论Edward Kit, Software Testing in the Real World: Improving the Process, Press, 1995.
Boris Beizer, Black-Box Testing, John Wiley Sons, and Unit Analysis and Testing, SEI Curriculum Module Zhu, PatrickA.V. Hall, JohnH.R. May, Software Unit Test Coverage and Adequacy, ACM Computing Surveys, vol 29, no物件导向软体测试 Testing Systems: Models, Patterns, and Tools, 2000.
JUnit
Test Infected: Programmers Love Writing TestsJUnit Cookbook
JUnit:ACooks Tour与JUnit 有关的软体开发流程[Beck 1999] Kent Beck, Extreme Programming Explained: Embrace Change, 1999.
Ron Jeffries, Ann Anderson, and Chet Hendrickson, Extreme Programming Installed, 2001.
●讲题介绍无错误的软体是软体专案的梦想,但随著软体系统日益庞杂,测试任务也越来越艰困.是否有既轻巧,威力强、弹性十足,又经济实惠的辅助工具呢Kent Beck 是extreme programming 创始人、Erich Gamma 是赫赫有名的Design Patterns 四巨头之一、
这两位软体大师通力合作的产物:JUnit,究竟有什0样的魅力、风靡软体界、更於2001~2002 连续两年赢得JavaWorld Editors Choice Awards 的Best Java Performance Tool 奖项呢且让我们一起来认识,掌握JUnit 软体测试架构吧!
ppt文档的标签: 软体 测试 架构
更多推荐标签: 过家门而不入   党课体会   谋生的交易   中考档案袋   银行客服中心   电冰箱原理   公司保密协议   图书馆硕士点   人才推荐理由   少先队网站   音乐网站文档   语文知识   招标计划   包管与物流   历史的回顾   当代热学发展   中医开题报告   行政环境特点   图书馆编目   一体化服务   网络游戏方案   成立总支请示   荔枝营销   质量管理学   房地产评估   养猪调查报告   申请低保报告   桥式起重机   优秀学生党员   英语口译实务  
相关文档推荐
旦行艺术多媒体教学软体设计
网格式运算的架构研讨会
架构改组问卷调查报告
软体安全
软体工程期中报告
现代金融架构
指纹软体使用手册
软体构型管理指引
企业信息系统的架构与组成
艺术与设计学系课程架构
南港软体育成中心-招商说明会
paradigm的架构
表格架构
第三篇网络基础架构及其应用
1研究架构
软体专案管理更动资料对照表
线上游戏发展及伺服器基本架构
软体架构与NET分散式系统设计案例
游戏软体
软体测试技术
推荐文档下载
2004年1月走势分析
走进名企:五名毕业生成功应聘启示
节目制作流程图
"做中学"科学教育研
高级日常英语实施方案
施肥机械
吴江市2006年度人口与计划生育任务分解
关于组织党员教师收视一切为了考生电教片的
教育部首批国家级示范性软件技术学院
保留持仓协议
"光盘目录表"
协议栈及应用实现
2005春会计学(财务会计方向)专科教学
信息技术与教育技术(下)教案
中央大学系级教师评审委员会组织章程准则
廉政公署
文法学院:艺术设计专业实验室(西图909
关于做好05年小升初交接工作的通知
以教育网络化信息化带动教育现代化
2003中国教育技术事业与产业发展招
 
文档下载提示:
·最新免费文档下载、毕业论文免费下载、Word文档下载、Excel表格下载、PDF电子书下载、PowerPoint提案下载
·所有文档均为网友上传,仅供学习参考,用作其它用途时请征得相关权益人许可.
·八文网只提供文档共享平台,不对文档内容的正确性及相关内容所引发的后果负责.
·如此文档"软体测试架构"涉及您的权益,请附上网址来信告知web_8wen(#)126.com,本站将认真配合并改正。
Copyright ©2005-2008 八文网-  8Wen.com . All rights reserved.