This plan includes
- Limited free courses access
- Play & Pause Course Videos
- Video Recorded Lectures
- Learn on Mobile/PC/Tablet
- Quizzes and Real Projects
- Lifetime Course Certificate
- Email & Chat Support
What you'll learn?
- The fundamentals of JUnit 5 and how it differs from earlier versions.
- Writing unit tests using JUnit 5 annotations and assertions.
- Understanding Mockito and its role in mocking dependencies.
- Implementing Test-Driven Development (TDD) to enhance code reliability.
- Testing Spring Boot applications with JUnit 5 and Mockito.
- Handling exceptions, mocking methods, and verifying interactions with Mockito.
- Writing database-related tests using JPA and ensuring data consistency.
- Creating integration tests to validate end-to-end functionality.
- Debugging test failures and improving application quality.
- Best practices for test automation and writing maintainable test cases.
Course Overview
This comprehensive course is designed to help developers, testers, and software engineers master the art of unit testing and mocking with JUnit 5 and Mockito. Through hands-on examples, detailed explanations, and best practices, you'll gain a deep understanding of unit testing, test-driven development (TDD), annotations, assertions, mocking techniques, and exception handling. Whether new to testing or looking to refine your skills, this course provides everything you need to build robust and reliable applications.
Pre-requisites
- Basic understanding of Java programming and object-oriented concepts.
- Familiarity with IDEs like IntelliJ IDEA, Eclipse, or Java IDE.
- A basic understanding of database operations (JPA or JDBC) is helpful but not mandatory.
- Eagerness to learn practical unit testing and mocking techniques.
Target Audience
- Java developers and software engineers looking to improve their testing skills.
- QA engineers and testers are eager to understand and implement unit testing in Java.
- Students and beginners interested in learning the basics of JUnit 5 and Mockito.
- Professionals aiming to implement Test-Driven Development (TDD) practices in real-world projects.
- Developers working on Spring Boot applications who want to build more reliable and maintainable code.
Curriculum 36 Lectures 03:09:38
Section 1 : Module 1
- Lecture 2 :
- What is Unit Testing and Test Driven Development
- Lecture 3 :
- What is Junit
- Lecture 4 :
- What are Annotations in Java
- Lecture 5 :
- BeforeEach Annotation
- Lecture 6 :
- AfterEach Annotation
- Lecture 7 :
- BeforeAll and AfterAll Annotation
- Lecture 8 :
- Test Annotation
- Lecture 9 :
- Disabled Annotation
- Lecture 10 :
- DisplayName Annotation
- Lecture 11 :
- Parameterized Test and ValueSource Annotation
- Lecture 12 :
- Repeated Test Annotation
- Lecture 13 :
- Tag Annotation
Section 2 : Module 2
- Lecture 1 :
- Life cycle of a Junit Test
- Lecture 2 :
- What is meant by Assertion
- Lecture 3 :
- Different Assertion methods
Section 3 : Module 3
- Lecture 1 :
- Package structure and Dependency
- Lecture 2 :
- Writing Our First Junit and Mockito Test
- Lecture 3 :
- Applying BeforeEach and AfterEach to our Test scenarios
- Lecture 4 :
- Applying BeforeAll and AfterAll to the test scenarios
- Lecture 5 :
- Code Coverage By Writing Test for Different Scenarios
- Lecture 6 :
- Static Import of Assert Function
- Lecture 7 :
- Writing Test for Complex Object with multiple Assertions
Section 4 : Module 4
- Lecture 1 :
- Usage of Mock Annotation to avoid dependencies getting null value
- Lecture 2 :
- Using When Then to bypass the dependency in our testing logic
- Lecture 3 :
- Test case for Get All Properties method in controller
- Lecture 4 :
- Test case for update price method in controller
Section 5 : Module 5
- Lecture 1 :
- Test case for Converter DTO to Entity
- Lecture 2 :
- Test case for Converter Entity to DTO
- Lecture 3 :
- Testing Saved Property of Service Layer
- Lecture 4 :
- Test case for Get All Properties in Service
- Lecture 5 :
- Test case for Update All Properties in Service
- Lecture 6 :
- Test case for Update Descriptionfor Property in Service
Section 6 : Module 6:
- Lecture 1 :
- Testing Exception Scenario -Part-1
- Lecture 2 :
- Testing Exception Scenario - Part-2
- Lecture 3 :
- Testing the Model or DTO classes
Our learners work at
Frequently Asked Questions
How do i access the course after purchase?
It's simple. When you sign up, you'll immediately have unlimited viewing of thousands of expert courses, paths to guide your learning, tools to measure your skills and hands-on resources like exercise files. There’s no limit on what you can learn and you can cancel at any time.Are these video based online self-learning courses?
Yes. All of the courses comes with online video based lectures created by certified instructors. Instructors have crafted these courses with a blend of high quality interactive videos, lectures, quizzes & real world projects to give you an indepth knowledge about the topic.Can i play & pause the course as per my convenience?
Yes absolutely & thats one of the advantage of self-paced courses. You can anytime pause or resume the course & come back & forth from one lecture to another lecture, play the videos mulitple times & so on.How do i contact the instructor for any doubts or questions?
Most of these courses have general questions & answers already covered within the course lectures. However, if you need any further help from the instructor, you can use the inbuilt Chat with Instructor option to send a message to an instructor & they will reply you within 24 hours. You can ask as many questions as you want.Do i need a pc to access the course or can i do it on mobile & tablet as well?
Brilliant question? Isn't it? You can access the courses on any device like PC, Mobile, Tablet & even on a smart tv. For mobile & a tablet you can download the Learnfly android or an iOS app. If mobile app is not available in your country, you can access the course directly by visting our website, its fully mobile friendly.Do i get any certificate for the courses?
Yes. Once you complete any course on our platform along with provided assessments by the instructor, you will be eligble to get certificate of course completion.For how long can i access my course on the platform?
You require an active subscription to access courses on our platform. If your subscription is active, you can access any course on our platform with no restrictions.Is there any free trial?
Currently, we do not offer any free trial.Can i cancel anytime?
Yes, you can cancel your subscription at any time. Your subscription will auto-renew until you cancel, but why would you want to?
Instructor
1580 Course Views
16 Courses