Home>Courses>Pragmatic Unit Testing in Java 8 with JUnit

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.

Intermediate

102 Lessons

13h

Certificate of Completion

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.
AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

91 Playgrounds
26 Quizzes
Course Overview
What You'll Learn
Course Content

Course Overview

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...Show More
In this course, you will learn how to write a unit test for Java applications using JUnit. You'll start by covering unit-testing...Show More

What You'll Learn

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
Learn how to effectively test Java applications using JUnit

Show more

Course Content

1.

Before We Begin

3 Lessons

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

3.

Digging Deeper into JUnit Assertions

9 Lessons

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

5.

Mastering Manic Mnemonics!

7 Lessons

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

6.

What to Test: The Right-BICEP

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

8 Lessons

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

8.

The Bigger Design Picture

5 Lessons

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

9.

Bigger Design Issues

6 Lessons

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

12.

The Bigger Unit-Testing Picture

10 Lessons

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

13.

Testing Some Tough Stuff

6 Lessons

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

14.

Testing on a Project

4 Lessons

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

15.

Wrapping Up

1 Lessons

Get familiar with applying unit testing techniques in practice and continuously refining skills.

16.

Appendix - Setting up JUnit

2 Lessons

Unpack the core of setting up JUnit in IntelliJ IDEA and NetBeans.

Trusted by 2.5 million developers working at companies

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor

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