Learn Java Unit Testing with Junit & Mockito in 30 Steps
OFF
IT & SoftwareMockito

Learn Java Unit Testing with Junit & Mockito in 30 Steps

4.4
(116,097 students)
5h

>_ What You'll 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

>_ Requirements

  • You have an attitude to learn while having fun
  • You have Java Programming Experience and ZERO Experience with Junit and Mockito
  • We will help you install Eclipse and get up and running with Maven

/ Course Details & Curriculum

Writing Great Unit Tests distinguishes Good Programmers from Great Programmers. <div> </div><div>In this course, you will learn how to Write Great <b>Java Unit Tests with Mockito and JUnit</b>. </div><div>COURSE HIGHLIGHTS </div><div>You take 12 steps with JUnit and 18 steps with Mockito into unit testing proficiency. </div><div>Mocking with Mockito </div><div><ul><li>Step 01 : Set up an Eclipse Project with JUnit and Mockito frameworks. First Green Bar. </li><li>Step 02 : Example to start understanding why we need mocks. </li><li>Step 03 : What is a stub? Create an unit test using Stub? Disadvantages of Stubs. </li><li>Step 04 : Your first Mockito code! Hurrah!!! Lets use Mockito to mock TodoService. </li><li>Step 05 : Stubbing variations with Mockito. A few mockito examples mocking List class : Multiple return values, Argument Matchers and throwing exceptions. </li><li>Step 06 : Introduction to BDD. Given When Then. BDD Mockito Syntax. </li><li>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. </li><li>Step 08 : How to capture an argument which is passed to a mock? </li><li>Step 09 : Hamcrest Matchers. </li><li>Step 10 : Let's simplify things with Mockito Annotations. @Mock, @InjectMocks, @RunWith(MockitoJUnitRunner.class), @Captor </li><li>Step 11 : JUnit Rules. Using MockitoJUnit.rule() instead of @RunWith(MockitoJUnitRunner.class). </li><li>Step 12 : Real world Example with Spring </li><li>Step 13 : What is a spy? How to spy with Mockito? </li><li>Step 14 : Some Theory : Why does Mockito not allow stubbing final and private methods? </li><li>Step 15 : Using PowerMock and Mockito to mock a Static Method. </li><li>Step 16 : Using PowerMock and Mockito to invoke a private Method. </li><li>Step 17 : Using PowerMock and Mockito to mock a constructor. </li><li>Step 18 : Good Unit Tests. </li></ul></div><div>JUnit Framework </div><div><ul><li>Step 01 : Need for Unit Testing </li><li>Step 02 : Setting up your First JUnit </li><li>Step 03 : First Successful JUnit. Green Bar and assertEquals </li><li>Step 04 : Refactoring Your First JUnit Test </li><li>Step 05 : Second JUnit Example assertTrue and assertFalse </li><li>Step 06 : @Before @After </li><li>Step 07 : @BeforeClass @AfterClass </li><li>Step 08 : Comparing Arrays in JUnit Tests </li><li>Step 09 : Testing Exceptions in JUnit Tests </li><li>Step 10 : Testing Performance in JUnit Tests </li><li>Step 11 : Parameterized Tests </li><li>Step 12 : Organize JUnits into Suites </li></ul></div><div>Start Learning Now. Hit the Enroll Button!</div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div>

Author and Instructor

i

in28Minutes Official

Expert at Udemy

With years of hands-on experience in IT & Software, in28Minutes Official has dedicated thousands of hours to teaching and mentorship. This course is the culmination of industry best practices and a proven curriculum that has helped thousands of students transition into professional roles.

Community Feedback

M

Michael Chen

Verified Enrollment

"This Learn Java Unit Testing with Junit & Mockito in 30 Steps course was exactly what I needed. The instructor explains complex IT & Software concepts clearly. Highly recommended!"

S

Sarah Johnson

Verified Enrollment

"I've taken many Udemy courses on enterprise Java development & Spring Boot, but this one stands out. The practical examples helped me land a job."

D

David Smith

Verified Enrollment

"Great value for money. The section on Mockito was particularly helpful."

E

Emily Davis

Verified Enrollment

"Excellent structure and pacing. I went from zero to hero in IT & Software thanks to this course. Lifetime access is a huge plus."

Common Questions

Is the "Learn Java Unit Testing with Junit & Mockito in 30 Steps" course truly discounted?
Yes. By utilizing our verified 90% coupon, you can enroll in "Learn Java Unit Testing with Junit & Mockito in 30 Steps" at a massive discount. This grants you lifetime access to all course materials and updates.
Do I qualify for a certificate upon completion?
Yes. When you enroll with a 90% coupon provided by CoursesWyn, you follow the same path as a paid student and are eligible for the official completion certificate from Udemy.
What happens if the coupon code expires?
Udemy coupons have strict enrollment limits and time windows. If this code expires, we recommend bookmarking this page and checking back daily, as we refresh our deals constantly to find the latest active discounts.
$99.99Save 90%
$9.99

Verified Discount Code

CLAIM DISCOUNT 🚀
Lifetime Access
🏆Official Certificate
📱Access on Mobile/TV
🔄Latest Updated Course

Claim Your Discount Code

XXXXXXXX
CLICK TO SHOW
$99.99
$9.9990%
GET DEAL