We may earn an affiliate commission when you visit our partners.
Course image
Bharath Thippireddy

Sample of the reviews:

Read more

Sample of the reviews:

Very good teacher, knows the material. Hands on exercises that are quick to write, but very useful to support the learning of the course content. I'll keep these tiny projects and I'll refer to it often when coding. I've learned a lot about JUnit testing and Mockito, but also about other tools useful in software unit testing: Ex: Spring, shortcuts in Eclipse. - Guy Audet

Very well explained, to the point, on short interval to grasp the content. Every lecture has purpose achieved. Simple examples. Really nice course. - Kaushal Trivedi

I enjoyed the course. The Course is well structured, principles were clearly explained, the sound and picture quality was good. I recommend the course to everyone who would like to begin with java unit testing. Thanks, Bharath. - Mario Banay

Are you a java developer who want to become an expert at Unit Testing ? Then this course is a quick practical guide for you. Learn how to write real unit tests using JUnit and Mockito. This course will simplify things with concepts and step by step implementations .

There are so many java professionals who write great code , but not unit tests. This course aims at filling that gap by covering JUnit and Mockito the two required frameworks to write good unit tests.

Learn and master the most popular unit testing technologies in this comprehensive course.

  • Understand the importance of writing Unit Tests

  • Updated to use the latest versions of JUnit and Mockito

  • Learn the Syntax of JUnit 4 and 5

  • Demystify the topics of Mocking

  • Write Unit tests using JUnit and Mockito

  • Learn what test coverage is and how to measure it

  • Run unit tests as a part of your Maven build

  • Learn how to Unit Test Spring Boot Applicaiton

  • All in easy steps

Mastering Unit Testing for Java Professionals:

JUnit is a open source Framework to test and assert code behavior . Mockito mocks out the dependencies and stub the expectations allowing testing a particular layer/unit in isolation.

Any java developer at any level can access the key lessons and concepts in this course and learn to write quality unit tests.

This course is perfect for every java developer who works on building high quality applications .

Contents and Overview:

In over 4 hours of lectures this course covers necessary JUnit API and its usage with Mockito.

This course covers the importance of unit testing , how to effectively use JUnit ,how mocking works and how to use Mockito to write real unit tests.

Up on completion you will be able to test Java and Spring Boot applications ,run unit tests as a part of your build and measure code coverage and improve it.

Enroll now

What's inside

Learning objectives

  • Learn what unit testing is
  • Understand the importance of unit testing
  • Learn the junit framework and api
  • Learn what mocking is and why we should mock
  • Write tests using junit and mockito
  • Learn what test coverage is and how to measure it
  • All in simple and easy steps
  • Spring testing quick start
  • Powermock quick start
  • Parameterized junit

Syllabus

Software Setup
Installing Java SDK and Eclipse IDE
Download the completed projects
Introduction
Read more
Course Introduction
Unit Testing Introduction
JUnit in Action
Improving the Coverage
JUnit Introduction
JUnit Introductioin
Hello JUnit
Maven Introduction
Testing for Exceptions
Exceptions
@Before and @After
Before and After
Using JUNIT 5
Create the project
Fix the annotations
Assert Exceptions
Run Tests
Run Tests using Maven
Rest of the course
JUNIT 5 and Mockito in Action
Download and Setup Project
Code Walk Through
Mocking Introduction
More Mockito
Test PlaceOrder
Test Negative Scenario
Test Exceptions
Test Cancel Order
Refactor and Test Negative Scenario
Exception Scenarios
Stubbing and setting expectations
Test Coverage
EclEmma Installation
Measuring coverage using Emma
Verification Mode
Verify More
Setup ScrapBook Project
Stub Void Methods Implicitly
Stub Void Methods Explicitly
Use doNothing to test Consecutive calls
Best Practices and Patterns
The F.I.R.S.T Principle
Test Doubles Introduction
Test Doubles In Mockito
Partial Mocking Using Mockito Spy
Spy vs Mock
Section 10 - Test Maven Java Web Application
Download and Setup the Project
Create the Test and Mocks
Test doGet
Test doPost
Parameterized JUnit
Setup Calculator Project
Create The Static Data Set Method
Create or Update The Test
The Parameterized Test Flow
Parameterized JUnits
Mocking Static Methods
Project Download and Setup
Mock Static Methods
Create Spring Boot Micro Services
Usecase
Install Spring Tool Suite
Configure JDK in STS
Install MySql
Install MySql workbench
Create the database tables
Create model and repos
Create the Rest Controller
Configure the DataSource
Test
Create the Project Model and Repository
Create the RestController
Configure the data source
Integrate Microservices
Integration Testing
Refactoring
Test Spring Boot Applications
Add Mockito Dependency
Test create method
Test getCoupon method

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Taught by Bharath Thippireddy, who is recognized for their work in Unit Testing
Teaches JUnit 5 and Mockito, which are modern software testing tools
Begins with easy steps and gradually progresses to advanced topics
Practical guide to writing real unit tests
Thoroughly explains Mocking
Covers integral topics for Java developers, including integration testing, parameterized JUnit

Save this course

Save JUnit and Mockito Crash Course to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in JUnit and Mockito Crash Course with these activities:
Attend a Unit Testing Meetup
Attend a unit testing meetup to connect with other professionals and learn about industry best practices.
Browse courses on Networking
Show steps
  • Find a local or virtual unit testing meetup.
  • Register for the meetup and plan to attend.
  • Prepare any questions or topics you would like to discuss.
  • Network with other attendees and share your experiences.
  • Follow up with any connections you make after the meetup.
Find a Unit Testing Mentor
Connect with a mentor who can provide guidance and support on unit testing practices.
Browse courses on Unit Testing
Show steps
  • Identify potential mentors in your network or online platforms.
  • Reach out to mentors and express your interest in their guidance.
  • Schedule regular meetings or calls to discuss your progress.
  • Seek feedback and advice on your unit testing approach.
  • Build a supportive relationship with your mentor.
Java Refresher
Review key Java concepts to strengthen your understanding before starting the course.
Browse courses on Java
Show steps
  • Review the basics of Java syntax.
  • Practice writing simple Java programs.
  • Review object-oriented programming concepts.
  • Test your understanding through online quizzes or exercises.
  • Seek clarification on any unclear concepts.
Five other activities
Expand to see all activities and additional details
Show all eight activities
Effective Java
Review a classic book on effective Java programming practices to reinforce your understanding of unit testing principles.
Show steps
  • Read the book and take notes.
  • Identify key concepts and principles related to unit testing.
  • Apply the principles to your own unit testing practices.
  • Discuss the book's concepts with other course participants.
  • Write a summary or review of the book.
Spring Boot Testing Tutorial
Follow a guided tutorial on Spring Boot testing to learn how to write effective unit tests for Spring Boot applications.
Browse courses on Spring Boot
Show steps
  • Find a suitable Spring Boot testing tutorial.
  • Follow the steps in the tutorial to set up your test environment.
  • Write unit tests for your Spring Boot application.
  • Run the tests and verify the results.
  • Review the tutorial content and identify any areas where you need further clarification.
JUnit and Mockito Exercises
Complete a set of exercises to reinforce your understanding of using JUnit and Mockito for unit testing Java applications.
Browse courses on JUnit
Show steps
  • Review the provided exercises.
  • Write the unit tests using JUnit and Mockito.
  • Run the tests and verify the results.
  • Review your results and identify any errors.
  • Make corrections to your code and re-run the tests.
Mock Calculator Project
Start a mock calculator project to apply your understanding of mocking in unit testing.
Browse courses on Mocking
Show steps
  • Create a new project for the mock calculator.
  • Design the calculator's functionality.
  • Implement the calculator's functionality using mock objects.
  • Write unit tests for the calculator using JUnit and Mockito.
  • Run the tests and verify the results.
Unit Testing Application
Create a unit testing application to demonstrate your proficiency in using JUnit and Mockito to write unit tests for Java applications.
Browse courses on Unit Testing
Show steps
  • Design the unit testing application.
  • Implement the unit tests using JUnit and Mockito.
  • Write the code for the unit testing application.
  • Run the unit tests and verify the results.
  • Document the unit testing application and its features.

Career center

Learners who complete JUnit and Mockito Crash Course will develop knowledge and skills that may be useful to these careers:

Reading list

We haven't picked any books for this reading list yet.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to JUnit and Mockito Crash Course.
Testing Spring Boot: Beginner to Guru
Most relevant
Java SE 17 Unit Testing with JUnit
Most relevant
JUnit 5 Fundamentals
Most relevant
Getting Started Unit Testing with JUnit 5
Most relevant
Introduction to JUnit 5 and Integration with Selenium
Most relevant
Java Application Deployment
Most relevant
Testing Spring Boot App with JUnit, Mockito &...
Most relevant
Unit Testing in Spring Framework 6 with JUnit
Most relevant
Fundamentals of Java Testing
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser