【精选】JUnit单元测试.pdfVIP

  • 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

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档