The Art of Unit Testing and TDD in Java

Recorded live during a three day class.
  • Lectures 22
  • Video 4 Hours
  • Skill level all level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

Course Description

Unit testing, done right, can mean the difference between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.

The Art of Unit Testing in Java course guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Mockito, Powermock and JMockit. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code.

What are the requirements?

  • Java and your favorite Java IDE

What am I going to get from this course?

  • Over 22 lectures and 3.5 hours of content!
  • Learn about readable, maintainable, trustworthy unit tests
  • Learn about Mocks, Stubs and Fakes and when to use which
  • Learn about Refactoring Techniques
  • Learn about Isolation (Mocking) Frameworks and how they differ

What is the target audience?

  • Developers of all levels

What you get with this course?

Not for you? No problem.
30 day money back guarantee

Forever yours.
Lifetime access

Learn on the go.
Desktop, iOS and Android

Get rewarded.
Certificate of completion

Curriculum

Section 1: Day 1
28:25

We learn what does "Unit" in "Unit Test" mean, and what is the role of TDD in software development. We also learn about the three types of unit tests we can write: Return Value Tests, State Tests and Interaction Tests.

13:47

In this talk we start learning about JUnit and some of its APIs. We also learn when NOT to use some of them.

07:29

A short demo about jUnit basics.

12:52

A short demo showing Test Driven Development

11:37

What do I mean when I say "The simplest thing that could possibly work"?

05:49

Why not write many tests at once? Why start with a failing test? why solve things in the simplest way? These and many more questions are covered in this short talk.

05:36

How much time to you lose -- and save-- by using TDD? here are some numbers from my own experience.

Section 2: Day 2
10:29

In this talk we learn about mocks and stubs using a simple problem of notifying a logger of something that happened.

09:16

A short demo showing how you can implement the extract interface pattern, constructor injection and hand written mocks to solve our problem of controlling a 3rd party logger in a unit test.

00:56

Fake, Stub, Mock, Spy... what does it all mean? Let's talk about it.

6 pages

Use these drills during the course.

08:42

In this demo we look at a more detailed problem, where we would need a stub and a mock in the same test.

19:53

In this talk we learn about Isolation frameworks and how they try to help us avoid some of the problems that hand written mocks and stubs can create. Later we will also see sometimes Isolation frameworks hurt more than they help.

04:35

A short demo showing how you can capture the arguments sent to a mock object created with Mockito.

Section 3: Day 3
13:34

In this talk we learn about the Extract and Override Refactoring, and why it is one of the coolest things you should know.

05:45

Learn a simple technique to handle time in your tests, and in your production code.

02:40

How do you deal with objects being creating directly inside legacy code? We can refactor that!

09:49

In this talk we learn what frameworks such as Powermock and JMockit have to offer, both in terms of APIs and in terms of test readability and maintinability.

01:21

A quick demo showing how to make static methods throw errors with Powermock.

02:14

Is it really easier and simpler to write tests for legacy code using unconstrained frameworks in Java? Is it easier and simpler to refactor the code? Let`s talk about it.

42:33

In this talk we step back and look at our build process, and where the tests fit in it. We also talk about some best practices during builds.

Summary
00:34

Instructor Biography

Roy Osherove , Author of 'The Art Of Unit Testing'

I run TDD and team leadership classes for software developers.

Roy Osherove is one of the original ALT. NET organizers. He consults and trains teams worldwide on the gentle art of unit testing, test-driven development and how to lead software teams. He frequently speaks at international conferences on these topics and others.

Roy is the author of the book The Art of Unit Testing, and writes about subjects such as unit testing, TDD Team Leadership and agile development on his blog

Join the biggest student community

6,400,000

Hours of video content

29,000,000

Course Enrollments

7,900,000

Students

Reviews

Average Rating
3.3
Details
  1. 5 Stars
    2
  2. 4 Stars
    0
  3. 3 Stars
    0
  4. 2 Stars
    1
  5. 1 Stars
    1
    • Bernard Łabno

    Detailed & practical

    Roy covers subject in great details with lots of practical examples. All his views are very well justified. This course really motivated me to do TDD. Thank you Roy!

    • Justin T

    Is this course worth the price?

    In summary this course feels like the teacher just uploaded a 3 day seminar he recorded without any additions to make it into a proper online course. All the lecture videos have had their audio fixed however, so you should be able to watch the lecture videos without a problem. Pros: Explained why testing is so important. Explained TDD. Talked about a couple of the popular testing frameworks. Cons: Hard to understand and therefore use the java drills given to practice what we learned from the videos. Needs better integration of the drills with the lecture videos. Can’t hear the questions from the students in the lecture videos. The slides from the class aren’t available, only the videos . Teacher does not response to questions about the course. Overall this course is not worth the price unless some changes are made. The teacher of this course is one of the top people in the field, so if he puts in some effort I’m sure this course can become worth 5 stars.

    • Lawrence C

    Very Poor Audio Quality

Ready to start learning?
Preview this course