Learn Java Unit Testing with Junit & Mockito in 30 Steps (Udemy.com)

Learn Mockito and JUnit - the most popular Java unit testing and mocking frameworks - with 25 Examples

Created by: in28Minutes Official

Produced in 2021

icon
What you will learn

  • You will Understand the Basics of Unit Testing with JUnit
  • You will Learn the Most Popular Mocking Framework - Mockito
  • You will Learn to Write Great Unit Tests using Mocking
  • You will Learn to Use Mockito in combination with Junit and PowerMock

icon
Quality Score

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 86 / 100

icon
Course Description

Writing Great Unit Tests distinguishes Good Programmers from Great Programmers. In this course, you will learn how to Write Great Java Unit Tests with Mockito and JUnit. WHATOURLEARNERSARESAYING:
5 STARS- When Ive started this course I had very basic knowledge of JUnit and Mockito and now everything is clearer. It is a very good course for beginners. Everything was very well explained.
5 STARS- As always, Ranga offers an excellent way of teaching: coding from scratch, good explanation, useful examples for the real world job. He is not only an experienced programmer, but also a great teacher. I learned more than I expected. Thanks5 STARS- It was my long time wish to learn Mockito and this instructor nailed it. Best 5hrs I spent ever. He is really good in what he is doing.
5 STARS- This course is a great tutorial to unit testing and standard practices of mocking. I would recommend it to even experienced developers who would be surprised to find some new ideas in here. Explanations are precise and detailed. Well done.
5 STARS- Very interesting course with good examples. Every topic was easy to understand because of author's awesome explanation. I rate this course as 5/5.
5 STARS- Very good course. The approach is very systematic and step by step. I really like the combination of theory and practical goes hand by hand. The journey from JUnit to Mockito to Powermock is very well described.
COURSEHIGHLIGHTSYou take 12 steps with JUnit and 18 steps with Mockito into unit testing proficiency.
Mocking with Mockito Step 01 : Set up an Eclipse Project with JUnit and Mockito frameworks. First Green Bar.
Step 02 : Example to start understanding why we need mocks.
Step 03 : What is a stub? Create an unit test using Stub? Disadvantages of Stubs.
Step 04 : Your first Mockito code! Hurrah!!! Lets use Mockito to mock TodoService.
Step 05 : Stubbing variations with Mockito. A few mockito examples mocking List class : Multiple return values, Argument Matchers and throwing exceptions.
Step 06 : Introduction to BDD. Given When Then. BDD Mockito Syntax.
Step 07 : How to verify calls on a mock? Verify how many times a method is called. We will add deleteTodo method to the TodoService.
Step 08 : How to capture an argument which is passed to a mock?
Step 09 : Hamcrest Matchers.
Step 10 : Let's simplify things with Mockito Annotations. @Mock, @InjectMocks, @RunWith(MockitoJUnitRunner.
class), @CaptorStep 11 : JUnit Rules. Using MockitoJUnit.
rule() instead of @RunWith(MockitoJUnitRunner.
class).
Step 12 : Real world Example with SpringStep 13 : What is a spy? How to spy with Mockito?
Step 14 : Some Theory : Why does Mockito not allow stubbing final and private methods?
Step 15 : Using PowerMock and Mockito to mock a Static Method.
Step 16 : Using PowerMock and Mockito to invoke a private Method.
Step 17 : Using PowerMock and Mockito to mock a constructor.
Step 18 : Good Unit Tests.
JUnit FrameworkStep 01 : Need for Unit TestingStep 02 : Setting up your First JUnitStep 03 : First Successful JUnit. Green Bar and assertEqualsStep 04 : Refactoring Your First JUnit TestStep 05 : Second JUnit Example assertTrue and assertFalseStep 06 : @Before @AfterStep 07 : @BeforeClass @AfterClassStep 08 : Comparing Arrays in JUnit TestsStep 09 : Testing Exceptions in JUnit TestsStep 10 : Testing Performance in JUnit TestsStep 11 : Parameterized TestsStep 12 : Organize JUnits into SuitesStart Learning Now. Hit the Enroll Button!
Who this course is for:
Students who want to learn unit testing with JunitStudents who want to learn mocking with MockitoWe will help you install Eclipse and Maven

icon
Instructor Details

in28Minutes Official

Ranga is an AWS Certified Solutions Architect Associate, AWS Certified Developer Associate and AWS Certified Cloud Practitioner.
We are teaching 30+Courses to 450KLearners on DevOps, Cloud ( AWS, PCF, GCP,and Azure ), Full Stack ( React, Angular ), Java Programming, and Java Frameworks ( Spring, Spring Boot, Spring MVC, Hibernate ).
[LEARNINGPATHS 00 to 06 for DevOps,Full Stack, Cloud, Spring Boot and Java in the FAQbelow]
We use Problem-Solution based Step-By-Step Hands-on Approach With Practical, Real-World Application Examples.
We have a wide range of courses focused on Spring Boot - Creating APIs and Microservices, Deploying toCloud ( AWS, Azure, Docker, Kubernetes, Azure ), and Integrating with Full Stack Front end frameworks ( React &Angular ).

[LEARNINGPATHS]

[LEARNINGPATH 00] - DevOps
Master DevOps with Docker, Kubernetes and Azure DevOps

[LEARNINGPATH 00] - DevOps
Master DevOps with Docker, Kubernetes and Azure DevOps

[LEARNINGPATH 01] - Spring and Spring Boot Web Applications & API Developer
Spring Framework Master Class - Learn Spring the Modern Way!
Learn Spring Boot in 100 Steps - Beginner to Expert
Master Java Web Services and RES

icon
More courses by in28Minutes Official

Master Microservices with Spring Boot and Spring Cloud

$11.99

Java Programming for Complete Beginners

$11.99

Java Interview Guide : 200+ Interview Questions and Answers

$11.99

Spring Framework Master Class - Java Spring the Modern Way

$11.99

Learn Spring Boot in 100 Steps - Beginner to Expert

$11.99

Spring MVC For Beginners - Build Java Web App in 25 Steps

$11.99

icon
More java courses

Object Oriented Programming in Java

Free

Complete JDBC Programming Part-2

$11.99

Java to Develop Programming Skills

$11.99

Selenium WebDriver with Java -Basics to Advanced+Frameworks

$11.99

Docker - Hands On for Java Developers

$11.99

Hibernate: Advanced Development Techniques

$11.99

icon
Reviews

4.3

259 total reviews

5 star 4 star 3 star 2 star 1 star
% Complete
% Complete
% Complete
% Complete
% Complete

By Mrityunjay Kumar on 12/20/2020

Good course

By Sagar Mane on 12/20/2020

nice video content and very nice explanation

By Yashas Samaga on 12/20/2020

JUnit, Mockito & Powermock basics with proper understanding delivered as promised.
looking forward to taking up more courses from the author.

By Shashank Kumar on 11/23/2020

na

By Raj Khare on 11/18/2020

very good course for starting the unit testing with Junit and Mockito. This course will make you comfortable in the unit testing starting from beginner level to expert. Teaching style and course materials are very good!!!...I can see the improvements in myself after spending times with course...thanks to In28Minutes!!!

By Zaryab Saiyadain on 11/8/2020

Good Explanation.

By Prasanjit S on 10/27/2020

Yes, but the sound is very low.

By Meera Shareef Shaik on 10/24/2020

.

By Indranil Dey1 on 10/24/2020

Very Good !

By Durga singh Thakur on 10/16/2020

explanation is good. it is useful for my project

By ASHISH KUMAR on 10/15/2020

Please add JUnit 5 related suggestions

By jay hung on 10/14/2020

....