Great course! I recommend supplementing it with tutorialspots' regular Mockito Tutorial for the assignment times. It makes it much easier to understand the next steps, especially when it comes to creating stubs in Mockito
Mocks and Stubs using Mockito
Step by step guide to Mocks, Stubs, and Mockito. Includes hands-on exercises for each topic
Lectures -31
Duration -43 mins
30-days Money-Back Guarantee
Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.
Course Description
Mocks are a special case objects that simulate real objects for testing. Mocks help you write Unit Test for complex, interconnected components, modules, and services.
This course teaches you everything you need to know about testing complex services with test doubles (Mocks and Stubs) in a way that is simple to understand. The course consitutes of videos, hands-on exercises and scenarios that guide you in the right direction and help you learn by doing things on your own.
Lectures are focused on building your knowledge intuitivley so that it's easier to transition this knowledge into real world solutions.
Course covers in-depth exploration of various topics like what are test doubles, mocks, stubs, the mockito library, testing errors with mocks and is designed keeping in mind real world applications of Mocks.
These tools and techniques are used by large organisations to test production grade applications with over a million lines of code!
About the teaching Style:
This course uses Socratic learning techniques, where you learn by actually solving coding assignments. It is structured in a way that you can do the first few chapters, and gain enough practical knowledge to apply it on a project. The coding assignments give you the confidence to directly use this knowledge during your job or your college.
If you already know a bit of Mocks and Stubs:
If you already know a bit about mocks and stubs, you might still benefit from this course. Just do the exercises, and watch the solution videos to verify. Make sure you watch the last video on next steps.
Goals
- Why do we need test doubles (mocks and stubs)?
- Understand how the behaviour of an object can be verified using mocks
- Understand how an interaction with an object can be simulated using stubs
- Learn how to create mocks using Mockito
- Test errors and exception scenarios using Mocks and Stubs
Prerequisites
- Hands-on programming experience
- Working knowledge of a unit testing framework such as JUnit or Jest
- Experience writing unit tests for functions of intermediate complexity
- Working knowledge of git, and a GitHub account
![Mocks and Stubs using Mockito Mocks and Stubs using Mockito](https://d3mxt5v3yxgcsr.cloudfront.net/courses/6210/course_6210_image.png)
Curriculum
Check out the detailed breakdown of what’s inside the course
Introduction to Test Doubles
3 Lectures
-
Overview - Mocks and Stubs 01:03 01:03
-
Who is this course meant for?
-
How To Use This Course 00:41 00:41
Setup and Overview
2 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
The First Test Double
5 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Intro to Mocks
5 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Intro To Stubs
5 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Testing Exceptions in Dependencies
4 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Mocking Libraries - Mockito
5 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Wrap Up and Next Steps
2 Lectures
![Tutorialspoint](/market/public/assets/images/loader.gif)
Instructor Details
![Abhinav Manchanda](https://www.tutorialspoint.com/assets/profiles/413137/profile/200_404774-1692708429.jpg)
Abhinav Manchanda
Course Certificate
Use your certificate to make a career change or to advance in your current career.
![sample Tutorialspoint certificate](/market/public/assets/newDesign/img/primePacks/V-certificate.png)
Our students work
with the Best
![adobe logo](/market/public/assets/newDesign/img/adobe.png)
![adp logo](/market/public/assets/newDesign/img/adp.png)
![apple logo](/market/public/assets/newDesign/img/apple.png)
![armani logo](/market/public/assets/newDesign/img/armani.jpg)
![bosch logo](/market/public/assets/newDesign/img/bosch.png)
![capegemini logo](/market/public/assets/newDesign/img/capegemini.png)
![cisco logo](/market/public/assets/newDesign/img/cisco.png)
![hdfc bank logo](/market/public/assets/newDesign/img/hdfcbank.png)
![ibm logo](/market/public/assets/newDesign/img/ibm.png)
![intel logo](/market/public/assets/newDesign/img/intel.png)
![mastercard logo](/market/public/assets/newDesign/img/mastercard.png)
![netflix logo](/market/public/assets/newDesign/img/netflix.png)
![qualcomm logo](/market/public/assets/newDesign/img/qualcomm.png)
![samsung logo](/market/public/assets/newDesign/img/samsung.png)
![sony logo](/market/public/assets/newDesign/img/sony.png)
![unilever logo](/market/public/assets/newDesign/img/unilever.png)
![walmart logo](/market/public/assets/newDesign/img/walmart.png)
![adobe logo](/market/public/assets/newDesign/img/adobe.png)
![adp logo](/market/public/assets/newDesign/img/adp.png)
![apple logo](/market/public/assets/newDesign/img/apple.png)
![armani logo](/market/public/assets/newDesign/img/armani.jpg)
![bosch logo](/market/public/assets/newDesign/img/bosch.png)
![capegemini logo](/market/public/assets/newDesign/img/capegemini.png)
![cisco logo](/market/public/assets/newDesign/img/cisco.png)
![hdfcbank logo](/market/public/assets/newDesign/img/hdfcbank.png)
![ibm logo](/market/public/assets/newDesign/img/ibm.png)
![intel logo](/market/public/assets/newDesign/img/intel.png)
![mastercard logo](/market/public/assets/newDesign/img/mastercard.png)
![netflix logo](/market/public/assets/newDesign/img/netflix.png)
![qualcomm logo](/market/public/assets/newDesign/img/qualcomm.png)
![samsung logo](/market/public/assets/newDesign/img/samsung.png)
![sony logo](/market/public/assets/newDesign/img/sony.png)
![unilever logo](/market/public/assets/newDesign/img/unilever.png)
![walmart logo](/market/public/assets/newDesign/img/walmart.png)
Feedbacks
Only 1 question,,if Mockito library saves our time for creating the extra classes, then shouldnt the statement mentioned while mocking StubUserRepository class be done for UserRepository Class?
Related Video Courses
View MoreAnnual Membership
Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses
Subscribe now![Annual Membership Annual Membership](/market/public/assets/newDesign/img/membership-large-small.jpg)
Online Certifications
Master prominent technologies at full length and become a valued certified professional.
Explore Now![Online Certifications Online Certifications](/market/public/assets/newDesign/img/traning-for-a-team.png)