On-site & Public, Instructor-led, Hands-on IT Training
800.756.3000
(International 01) 908.233.8900
  400+ Course Offerings:


Search for Course:

JA1400 Mastering Test-Driven Development using JUnit
 
 
Duration 4 Days
Delivery Method Instructor Led, Hands-on Workshops
Public Price $2100.00


DESCRIPTION (Return to Top)

Mastering Test Driven Development using JUnit is a four-day, comprehensive hands-on test-driven development / JUnit / TDD training course geared for developers who need to get up and running with essential Test-driven development programming skills using JUnit and various open-source testing frameworks. Throughout the course students learn the best practices for writing great programs in Java, using test-driven development techniques. This comprehensive course also covers essential TDD topics and skills.



AUDIENCE (Return to Top)

Experienced Java programmers



OBJECTIVES (Return to Top)

Students who attend Mastering Test-Driven Development using JUnit will leave the course armed with the skills they require to develop solid Java programs, using sound coding testing techniques and best coding practices. This course quickly introduces developers to the features of JUnit and educates them regarding JUnit’s strengths and weaknesses.

A complete understanding of TDD concepts, processes, and practices requires some in-depth hands-on experience. During this class, students spend significant time working on a course project. The project exercises are specifically oriented towards using TDD to implement a complex and multi-faceted web application that uses a database in its final form. During the course project, the students:

  • Test basic Java functionality
  • Test web-functionality implemented in JEE
  • Use mocks for needed resources
  • Replace mocks and test database operations
  • Optionally, integrate the layers of the application using Spring and testing as they progress

This course includes coverage of many of the essential JUnit capabilities, and can be tailored to focus exactly on the areas that you are interested in.

Working within in a dynamic, learning environment, guided by our expert TDD team, attendees will:

  • Understand JUnit.
  • Understand and use the JUnit Test Runner interface.
  • Use JUnit to drive the implementation of Java code.
  • Test applications using native IDE support.
  • Best practices and patterns for test development.
  • Understand JUnit’s strengths and weaknesses
  • Understand the role of debugging when done in conjunction with tests.
  • Understand not only the fundamentals of the TDD using Java, but also its importance, uses, strengths and weaknesses.
  • Understand how JUnit affects your perspective on development and increases your focus on a task.
  • Learn good JUnit coding style.
  • Create well structured JUnit programs.
  • Compile and execute programs using JUnit, jWebUnit, and DBUnit using the IDE of your choice.
  • How to extend testing with mock objects using EasyMock.
  • Look at refactoring techniques available to make code as reusable/robust as possible.
  • Discuss various testing techniques.

The following JUnit-based testing frameworks are examined:

  • JUnit 4.x
  • jWebUnit
  • EasyMock
  • DBUnit

Experiential Learning – Course Structure

Throughout the course students will be led through a series of progressively advanced topics, where each topic consists of lecture, group discussion, comprehensive hands-on lab exercises, and lab review.

Multiple complete “mini-projects” are laced throughout the course, designed to reinforce fundamental skills and concepts learned in the lessons, all working in the JUnit environment. Because these lessons, labs and projects are presented in a building block fashion, students will gain a solid understanding of not only the core concepts, but also how all the pieces fit together in a complete application.



TOPICS (Return to Top)

Session: Introducing Test-Driven Development (TDD)

  • Test-Driven Development

Session: JUnit

  • JUnit Overview
  • Jumpstart: JUnit 4.x
  • @Test Annotation
  • Hamcrest
  • Parameterized Tests
  • Theories
  • JUnit Best Practices

Session: Testing Tools

  • Web Testing: jWebUnit/HttpUnit
  • Mocking of Components
  • Mock Objects and EasyMock

Session: Advanced Topics

  • State-based vs. Interaction-based Testing
  • Improving Code Quality Through Refactoring
  • Database Testing
  • Appendix: Adding Testing to the Build Process


PREREQUISITES (Return to Top)

This is an intermediate-to-advanced level Java course, designed for developers who wish to get up and running on test-driven development immediately. Attendees should be familiar with Java and object-oriented technologies. Real world programming experience is a must.