Mocks and Stubs: Test Doubles with Mockito
What you'll learn
- 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
- 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 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.
Who this course is for:
- Developers working on complex codebases looking to unit test complicated, interdependent pieces of code
- Developer who have learnt the basics of unit tests and want to gain an intermediate level understanding of unit testing
- Developers who know a little bit about mocks and stubs, but want to understand the topic in more detail
Abhinav Manchanda is a trainer and software developer. He was the lead trainer at ThoughtWorks University, a program that trained attendees from 12 countries. He setup the Android Bootcamp initiative within ThoughtWorks, and has trained employees of more than 10 companies.
Recently, Abhinav has been training students and companies in a variety of technical areas including programming basics, data structures and algorithms, clean code practices, and Android development. Abhinav aims to change the face of technical education in India!
Omkar Birade is a Co-Founder at Interleap who likes to solve trivial to complex problems in most creative ways. He has worked side by side with industry experts and helped build technical courses including Test Driven Development, Docker, Clean Coding and many more.
Omkar has worked with end to end development and deployment of products and is eager to share the knowledge through means of his online courses.
“The students of the future will demand the learning support that is appropriate for their situation or context. Nothing more, nothing less. And they want it at the moment the need arises. Not sooner, not later. Mobile devices will be a key technology to providing that learning support.”
- Dr. Marcus Specht