This course is in draft mode. Roy Osherove is still putting content to the course.

The Art of Unit Testing and TDD in Java

Recorded live during a three day class.
4 reviews
  • 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

  • Lifetime access to 22 lectures
  • 3+ hours of high quality content
  • A community of 400+ students learning together!

The Art of Unit Testing and TDD in Java

Recorded live during a three day class.
4 reviews


Discover courses made by experts from around the world.

Take your courses with you and learn anytime, anywhere.

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


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.

    • Java and your favorite Java IDE
    • 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
    • Developers of all levels


30 day money back guarantee
Lifetime access
Available on Desktop, iOs and Android
Certificate of completion


  • SECTION 1:
    Day 1
  • 1
    Introduction to Unit Testing Ideas

    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.

  • 2
    Introduction to JUnit

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

  • 3
    Unit Testing Demo

    A short demo about jUnit basics.

  • 4
    Introducing TDD

    A short demo showing Test Driven Development

  • 5
    Simplicity is Complicated

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

  • 6
    Common TDD Questions and Answers

    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.

  • 7
    Some Numbers

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

  • SECTION 2:
    Day 2
  • 8
    Introduction to Mocks and Stubs

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

  • 9
    Demo - Mock Objects

    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.

  • 10

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

  • 11
    6 pages

    Use these drills during the course.

  • 12
    Mocks And Stubs

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

  • 13
    Isolation (Mocking) Frameworks

    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.

  • 14
    Capturing Mock Arguments

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

  • SECTION 3:
    Day 3
  • 15
    Extract And Override Refactoring

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

  • 16
    Faking Time

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

  • 17
    Faking Futures

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

  • 18
    Unconstrained Isolation Frameworks

    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.

  • 19
    Throw Errors with Powermock

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

  • 20
    Discussion About Pros and Cons of Unconstrained Frameworks

    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.

  • 21
    Continuous Delivery

    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.

  • 22


Hours of video content
Course Enrollments


  • 2
  • 0
  • 0
  • 1
  • 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

  • 30 day money back guarantee!
  • Lifetime Access. No Limits!
  • Mobile Accessibility
  • Certificate of Completion