Course outline for JUnit and Mockito
TechnologyJUnit and MockitoDuration
* 2-3 days
LevelPrerequisites listed
About JUnit and Mockito
Pre-requisites
- The participants must be comfortable with programming constructs in Java
Lab Setup
- Hardware Configuration - Participants must have access to a system with the following hardware configuration
- 2GB of free RAM, 20GB of free disk space and full network connectivity
- Software Configuration
- Ubuntu 20.04/22.04 Desktop Edition (sudo/root access required)
- Firefox and Chrome Browsers
- Install - JDK
How we train
Online training for JUnit and Mockito
- Instructor-led live cohorts
- Self-paced learning with expert coaches
- 24x7 cloud labs with end-to-end examples
All sessions are 100% hands-on. Labs and activities are derived from real-world work our engineers deliver.
Classroom training
Available for corporate teams in:
- Bengaluru
- Chennai
- Hyderabad
- Mumbai
- Delhi/Gurgaon/NCR
- Pune
Note: Classroom training is for corporate clients only.
Self-paced hands-on sessions are delivered via VirtualCoach.
Detailed Course Outline
Hands-onIntroduction to JUnit
- Installation and Environment setup
- Need of JUnit testing
- JUnit testing - “Hello World”
JUnit Testing Framework
- Assert class
- TestCase class
- TestSuit class
- TestResult class
Assertions and Annotations
- Learn about various JUnit test methods
- Learn about basic JUnit Annotations
- Creating a simple test
Advanced Concepts
- Aggregating tests in suites
- Parameterized tests
- Exception testing
- Timeout for tests
JUnit extensions and tools
- XMLUnit
- MockObject
- EvoSuite
- Other JUnit extensions and tools
Mockito
- Introduction to Mocking
- Integration with JUnit
- Expecting and Varying Calls
- Exception Handling
More about Mockito
- Methods to create mock objects
- Configuring mocks
- Verifying method call order
- Calling Callbacks with Mockito
- Spies in Mockito
- Reseting and Reusing mocks