- 3
- 0
- 约5.86千字
- 约 12页
- 2017-12-04 发布于贵州
- 举报
【精选】JUnit单元测试
第8章 Junit单元测试
1 JUnit简介和环境安装
主 2 一个简单的测试例Calculator
要
内 3 参数化和打包
容
4 打桩和驱动
5 覆盖测试
1
8.1 JUnit简介
JUnit is a simple framework to write
repeatable tests. It is an instance of the
xUnit architecture for unit testing
frameworks.
JUnit是由Erich Gamma 和Kent Beck 编写的
一个回归测试框架(regression testing
framework) 。
8.1 JUnit简介cont.
Erich Gamma 是 《设计模式》的作者之一,也是
Eclipse系统架构的设计师。
Kent Beck 是极限编程、测试驱动开发的创始人。
2
8.1 JUnit简介cont.
Design Patterns: Elements of Reusable Object-
Oriented Software is a software engineering book
describing recurring solutions to common problems
in software design. The books authors are Erich
Gamma,Richard Helm, Ralph Johnson and John
Vlissides with a foreword by Grady Booch. The book
is divided into two parts, with the first two chapters
exploring the capabilities and pitfalls of object-
oriented programming, and the remaining chapters
describing 23 classic software design patterns. The
book includes examples in C++and Smalltalk.
8.1 JUnit简介cont.
Gang of Four: Erich Gamma,Richard Helm, Ralph
Johnson and John Vlissides
1994年第一版 《设计模式》
3
8.1 JUnit简介cont.
Grady Booch 是
Rational公司的UML的
设计者,Rational后被
IBM收购
Grady Booch in 2011.
8.1 Junit安装
Eclipse
中已经
集成了
JUnit
4
8.2 第一个测试例
待测单元
Calculator类,
一个静态成员储存运算结果
实现了如下方法
public int add(int n)
public int substract(int n)
public int multiply(int n)
public i
您可能关注的文档
- 【精选】iec101解析.ppt
- 【精选】IF爱乎补水护肤品产品简介.pdf
- 【精选】IGCSE选科手册.doc
- 【精选】IIA内部审计新定义及其英文翻译.doc
- 【精选】IIS发布dedecms网站教程.pdf
- 【精选】IHUNTER猎头业务流程管理平台方案.pdf
- 【精选】iMac快捷键.doc
- 【精选】imagemagick convert的简单用法.doc
- 【精选】IMG 132E 使用手册-2012ss.pdf
- 【精选】ImgBurn:软件虽小,能耐不小.doc
- 广东省广州省实验中学教育集团2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州大学附属中学2025-2026学年八年级上学期奥班期中物理试题(解析版).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(含答案).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(解析版).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 2026《中国人寿上海分公司营销员培训体系优化研究》18000字.docx
- 《生物探究性实验教学》中小学教师资格模拟试题.docx
原创力文档

文档评论(0)