Java Test Driven Development with TestNG

PT20518
Training Summary
Test Driven Development (TDD) has become a standard best practice for developers, especially those working in an Agile development environment. TDD is more than just automated unit testing, it is a team and individual development discipline that, when followed correctly, increases productivity of both individual developers and entire teams. From the programmer’s perspective, TDD has another benefit – it allows programmers to eliminate the tedious tasks of debugging and reworking code so that programmers can focus on the creative work of designing and writing code. It makes programming fun again. The course integrates two primary learning streams. The first is the how to effectively implement TDD in a production or development environment and integrating TDD practices with other practices like software craftsmanship, agile design practices, continuous integration and best practices in object oriented programming and Java development. The second learning stream is an in depth and hands on deep dive into Java TDD tools such as mocking libraries, matching libraries and the TestNG framework itself. TestNG (Test Next Generation) is a test framework inspired by JUnit and NUnit but with additional features and functionality The class is designed to be about 50% hands on labs and exercises, about 25% theory and 25% instructor led hands on learning where students code along with the instructor.
Prerequisites
Before taking this course, students should have a good knowledge of Java and have at least an intermediate programming skill level.
Duration
3 Days/Lecture & Lab
Audience
This course is designed for Java programmers.
Course Topics
The TDD process - “red, green, refactor”
  • Eliminating technical debt with TDD
  • Why TDD works
  • Integrating the TDD discipline into a development process
  • Using TDD to support programming and design best practices
  • Developing a TDD project using TestNG
  • TestNG concepts, architecture and features
  • Organizing and managing tests using testng.xml
  • Assertion libraries (hamcrest, etc.)
  • Using Mocks effectively
  • Mocking libraries (Mockito, JMockit, EasyMock, etc.)
  • How to developing good tests and test suites
  • Best practices when using TDD and JUnit to improve development
  • Code smells and refactoring
  • Using TDD to refactor code
  • Migrating to TDD as a programming discipline

Related Scheduled Courses