Practical Test Driven Development for Java Programmers
4.5 (881 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
5,562 students enrolled

Practical Test Driven Development for Java Programmers

A truly practical approach to the fundamentals of test driven development in Java, featuring JUnit and Mockito,
4.5 (881 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
5,562 students enrolled
Last updated 10/2019
English
English
Current price: $34.99 Original price: $49.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 4 hours on-demand video
  • 1 article
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Be able to confidently create software using Test Driven Development techniques.
  • Be able to use Mocking frameworks such as Mockito
  • Understand how to write tests for trickier scenarios
  • Using TDD techniques to fix applications which weren't developed using TDD
Course content
Expand all 38 lectures 04:02:59
+ Chapter 2 - JUnit
4 lectures 23:43

In this course I use the Eclipse IDE, but if you're using IntelliJ this video will show you how to use JUnit in your IDE

Using the IntelliJ IDE
08:10
Creating a project structure for test cases
05:00
JUnit Basics
08:31
+ Chapter 3 - First tests
6 lectures 29:44
Thinking about examples and outcomes
02:57
Step 1 - getting to red
06:08
Step 2 - getting to green
02:29
Adding more tests
05:52
Finally writing some code
07:39
+ Chapter 4 - Practising the basics
5 lectures 39:16
Testing for exceptions - and challenge number 1
09:41
Challenge 2 - writing a test
02:38
Solution to challenge 2
03:36
Getting to more complex requirements and finding hidden bugs
11:48
Challenge 3 - Adding further business requirements
11:33
+ Chapter 5 - Refactoring
2 lectures 10:15
Getting started with refactoring - extracting constants
05:43
More refactoring - restructuring our code
04:32
+ Chapter 6 - Best Practices
2 lectures 12:22
What is a good or bad test?
06:58
JUnit Asserts
05:24
+ Chapter 7 - Stubs
2 lectures 18:05
The challenge of testing code that has dependencies
03:55
Creating a test stub using just Java
14:10
+ Chapter 8 - Mocks and Mockito
4 lectures 26:40
Why we want to test behaviour as well as logic
05:58
Setting up Mockito and creating a mock
08:44
Using mocks to test behaviour
09:22
Mockito syntax options
02:36
+ Chapter 9 - Fakes and Tautologies
4 lectures 26:24
What are Fakes or Dummies
05:05
Practical exercise - using Mockito to create a stub
04:30
Refactoring our tests - using setup and teardown
07:32
How to avoid tautologies
09:17
+ Chapter 10 - Handling legacy code
5 lectures 48:45
Loading up the case study
04:27
Understanding the challenge part 1
08:21
Understanding the challenge part 2
08:34
Using a Spy
13:01
Practical exercise - finding the fault in the business logic
14:22
Requirements
  • Basic Java knowledge and at least some experience in programming. No experience of JUnit or writing tests is needed.
Description

This course covers the fundamentals of test driven development for Java programmers... not just the theory, but how to use it in real world project examples. This includes mocking with Mockito. This includes some hands on exercises and how to deal with legacy code that doesn't have tests in place. 

IMPORTANT NOTE ABOUT JAVA VERSIONS - This course covers JUnit4 and JUnit5 and is compatible with Java versions 7,8 and 11+.

Who this course is for:
  • Experienced and more novice Java developers who want to switch to a more agile way of programming
  • Programmers who want to improve the way they approach test driven development