Course Code: junit
Duration: 21 hours
Prerequisites:

参加本课程需要基本的 Java 语言知识。

Overview:

JUnit是一个编写可重复测试并对Java语言进行单元测试的框架。

Course Outline:

JUnit 快速启动

  • 证明它有效
  • 从零开始
  • 了解单元测试框架
  • 设置 JUnit
  • 使用 JUnit 进行测试

探索 JUnit

  • 探索核心 JUnit
  • 使用测试运行程序启动测试
  • 使用 TestSuite 编写测试
  • 使用 TestResult 收集参数
  • 使用 TestListener 观察结果
  • 使用 TestCase
  • 单步执行 TestCalculator

采样 JUnit

  • 控制器组件简介
  • 让我们来测试一下吧!
  • 测试异常处理
  • 设置用于测试的项目

检查软件测试

  • 为什么我们需要单元测试
  • 检查种类
  • 确定测试的好坏
  • 测试驱动开发

自动化 JUnit

  • 生活中的一天
  • 从 Ant 运行测试
  • 从 Maven 运行测试
  • 从 Eclipse 运行测试

使用存根进行粗粒度测试

  • 存根简介
  • 在 HTTP 连接示例上练习
  • 存根 Web 服务器的资源
  • 存根连接

使用模拟对象进行隔离测试

  • 引入模拟对象
  • 模拟品酒的简单例子
  • 使用模拟对象作为重构技术
  • 在 HTTP 连接示例上练习
  • 使用模拟作为特洛伊木马
  • 决定何时使用模拟对象

使用Cactus进行容器内测试

  • 单元测试组件的问题
  • 使用模拟对象测试组件
  • 集成单元测试
  • 介绍仙人掌
  • 使用 Cactus 测试组件
  • 仙人掌的工作原理

对 Servlet 和过滤器进行单元测试

  • 显示管理应用程序
  • 使用 Cactus 编写 servlet 测试
  • 使用模拟对象测试 Servlet
  • 使用 Cactus 编写过滤器测试
  • 何时使用 Cactus,何时使用模拟对象

对 JSP 和 taglib 进行单元测试

  • 重新访问管理应用程序
  • JSP 单元测试
  • 使用 Cactus 单独对 JSP 进行单元测试
  • 使用 Cactus 对标签库进行单元测试
  • 使用模拟对象对标记库进行单元测试
  • 何时使用模拟对象,何时使用 Cactus

对数据库应用程序进行单元测试

  • Database 单元测试
  • 独立于数据库测试业务逻辑
  • 测试与数据库隔离的持久性代码
  • 编写数据库集成单元测试
  • 使用 Ant 运行 Cactus 测试
  • 优化生成性能
  • 整体数据库单元测试策略

对 EJB 进行单元测试

  • 定义样本 EJB 应用程序
  • 使用立面策略
  • 使用模拟对象对 JNDI 代码进行单元测试
  • 单元测试会话 Bean
  • 使用模拟对象测试消息驱动的 Bean
  • 使用模拟对象测试实体 Bean
  • 选择正确的模拟对象策略
  • 使用集成单元测试
  • 使用 JUnit 和远程调用
  • 使用仙人掌
Sites Published:

United Arab Emirates - Unit Testing with JUnit

Qatar - Unit Testing with JUnit

Egypt - Unit Testing with JUnit

Saudi Arabia - Unit Testing with JUnit

South Africa - Unit Testing with JUnit

Brasil - Testes Unitários com JUnit

Canada - Unit Testing with JUnit

中国 - Unit Testing with JUnit

香港 - Unit Testing with JUnit

澳門 - Unit Testing with JUnit

台灣 - Unit Testing with JUnit

USA - Unit Testing with JUnit

Österreich - Unit Testing mit JUnit

Schweiz - Unit Testing mit JUnit

Deutschland - Unit Testing mit JUnit

Czech Republic - Unit Testing with JUnit

Denmark - Unit Testing with JUnit

Estonia - Unit Testing with JUnit

Finland - Unit Testing with JUnit

Greece - Unit Testing with JUnit

Magyarország - Unit Testing with JUnit

Ireland - Unit Testing with JUnit

Luxembourg - Unit Testing with JUnit

Latvia - Unit Testing with JUnit

España - Prueba de Unidad con JUnit

Italia - Unit Testing with JUnit

Lithuania - Unit Testing with JUnit

Nederland - Unit Testing with JUnit

Norway - Unit Testing with JUnit

Portugal - Testes Unitários com JUnit

România - Unit Testing with JUnit

Sverige - Unit Testing with JUnit

Türkiye - Unit Testing with JUnit

Malta - Unit Testing with JUnit

Belgique - Unit Testing with JUnit

France - Unit Testing with JUnit

日本 - Unit Testing with JUnit

Australia - Unit Testing with JUnit

Malaysia - Unit Testing with JUnit

New Zealand - Unit Testing with JUnit

Philippines - Unit Testing with JUnit

Singapore - Unit Testing with JUnit

Thailand - Unit Testing with JUnit

Vietnam - Unit Testing with JUnit

India - Unit Testing with JUnit

Argentina - Prueba de Unidad con JUnit

Chile - Prueba de Unidad con JUnit

Costa Rica - Prueba de Unidad con JUnit

Ecuador - Prueba de Unidad con JUnit

Guatemala - Prueba de Unidad con JUnit

Colombia - Prueba de Unidad con JUnit

México - Prueba de Unidad con JUnit

Panama - Prueba de Unidad con JUnit

Peru - Prueba de Unidad con JUnit

Uruguay - Prueba de Unidad con JUnit

Venezuela - Prueba de Unidad con JUnit

Polska - Unit Testing with JUnit

United Kingdom - Unit Testing with JUnit

South Korea - Unit Testing with JUnit

Pakistan - Unit Testing with JUnit

Sri Lanka - Unit Testing with JUnit

Bulgaria - Unit Testing with JUnit

Bolivia - Prueba de Unidad con JUnit

Indonesia - Unit Testing with JUnit

Kazakhstan - Unit Testing with JUnit

Moldova - Unit Testing with JUnit

Morocco - Unit Testing with JUnit

Tunisia - Unit Testing with JUnit

Kuwait - Unit Testing with JUnit

Oman - Unit Testing with JUnit

Slovakia - Unit Testing with JUnit

Kenya - Unit Testing with JUnit

Nigeria - Unit Testing with JUnit

Botswana - Unit Testing with JUnit

Slovenia - Unit Testing with JUnit

Croatia - Unit Testing with JUnit

Serbia - Unit Testing with JUnit

Bhutan - Unit Testing with JUnit

Nepal - Unit Testing with JUnit

Uzbekistan - Unit Testing with JUnit