HomeCoursesPragmatic Unit Testing in Java 8 with JUnit
AI-powered learning
Save

Pragmatic Unit Testing in Java 8 with JUnit

Explore writing unit tests for Java applications using JUnit, delve into JUnit organization, assertions, quality practices, design relevance, refactoring, and using mock objects for dependencies.

4.4
102 Lessons
13h
Join 2.9 million developers at
Join 2.9 million developers at
LEARNING OBJECTIVES
  • Learn how to effectively test Java applications using JUnit
  • Get to know the core quality principles of unit testing
  • Master writing cleaner and refactored JUnit tests

Learning Roadmap

102 Lessons26 Quizzes

1.

Before We Begin

Before We Begin

Get familiar with pragmatic unit testing principles, JUnit practices, and their benefits.

3.

Digging Deeper into JUnit Assertions

Digging Deeper into JUnit Assertions

9 Lessons

9 Lessons

Break apart critical JUnit assertions, styles, decorators, floating-point comparisons, and exception handling techniques.

4.

Organizing Your Tests

Organizing Your Tests

8 Lessons

8 Lessons

Break down complex ideas for organizing and optimizing unit tests in JUnit.

5.

Mastering Manic Mnemonics!

Mastering Manic Mnemonics!

7 Lessons

7 Lessons

Deepen your knowledge of the FIRST principles to enhance unit test effectiveness and reliability.

6.

What to Test: The Right-BICEP

What to Test: The Right-BICEP

8 Lessons

8 Lessons

Investigate the Right-BICEP technique for structured unit testing, focusing on correctness, boundaries, inverses, cross-checks, errors, and performance.

7.

Boundary Conditions: The CORRECT Way

Boundary Conditions: The CORRECT Way

8 Lessons

8 Lessons

Piece together the parts of evaluating boundary conditions using the CORRECT acronym for thorough testing.

8.

The Bigger Design Picture

The Bigger Design Picture

5 Lessons

5 Lessons

Try out refactoring techniques to optimize code clarity and maintainability using JUnit tests.

9.

Bigger Design Issues

Bigger Design Issues

6 Lessons

6 Lessons

Get started with applying SOLID principles, command-query separation, and optimizing test maintenance for better design.

10.

Using Mock Objects

Using Mock Objects

7 Lessons

7 Lessons

Break apart the use of mock objects to streamline and improve unit testing.

11.

Refactoring Tests

Refactoring Tests

10 Lessons

10 Lessons

Enhance your skills in refactoring tests to improve readability, maintainability, and effectiveness.

12.

The Bigger Unit-Testing Picture

The Bigger Unit-Testing Picture

10 Lessons

10 Lessons

Dig deeper into Test-Driven Development, its cycle, incremental coding, refactoring, and effective test documentation.

13.

Testing Some Tough Stuff

Testing Some Tough Stuff

6 Lessons

6 Lessons

Tackle testing challenges in multithreaded code, application logic extraction, database testing, and mocking controllers.

14.

Testing on a Project

Testing on a Project

4 Lessons

4 Lessons

Piece together the parts of unit testing, team standards, CI, and code coverage.

16.

Appendix - Setting up JUnit

Appendix - Setting up JUnit

2 Lessons

2 Lessons

Unpack the core of setting up JUnit in IntelliJ IDEA and NetBeans.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Author NamePragmatic Unit Testing inJava 8 with JUnit
Developed by MAANG Engineers
ABOUT THIS COURSE
In this course, you will learn how to write a unit test for Java applications using JUnit. You'll start by covering unit-testing foundations, which provide you with a starter set of information about writing basic tests in JUnit. You’ll learn about JUnit organization and assertions, and you’ll pick up a few core quality practices for unit testing such as the Right BICEP and the CORRECT way. Towards the end, the bigger design picture focuses on the relevance of design to unit testing and vice versa. You’ll refactor your tests, and you’ll learn how to use mock objects to deal with trouble-some dependencies.
ABOUT THE AUTHOR

The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.

Learn more about The

Trusted by 2.9 million developers working at companies

These are high-quality courses. Trust me the price is worth it for the content quality. Educative came at the right time in my career. I'm understanding topics better than with any book or online video tutorial I've done. Truly made for developers. Thanks

A

Anthony Walker

@_webarchitect_

Just finished my first full #ML course: Machine learning for Software Engineers from Educative, Inc. ... Highly recommend!

E

Evan Dunbar

ML Engineer

You guys are the gold standard of crash-courses... Narrow enough that it doesn't need years of study or a full blown book to get the gist, but broad enough that an afternoon of Googling doesn't cut it.

S

Software Developer

Carlos Matias La Borde

I spend my days and nights on Educative. It is indispensable. It is such a unique and reader-friendly site

S

Souvik Kundu

Front-end Developer

Your courses are simply awesome, the depth they go into and the breadth of coverage is so good that I don't have to refer to 10 different websites looking for interview topics and content.

V

Vinay Krishnaiah

Software Developer

Built for 10x Developers

No Passive Learning
Learn by building with project-based lessons and in-browser code editor
Learn by Doing
Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go
Learn by Doing
Future-proof Your Career
Get hands-on with in-demand skills
Learn by Doing
AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"
Learn by Doing
Learn by Doing
MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies
Learn by Doing

Free Resources

FOR TEAMS

Interested in this course for your business or team?

Unlock this course (and 1,000+ more) for your entire org with DevPath