Course description
Welcome to the "JUnit5" course, designed to provide a comprehensive understanding of JUnit5, the latest version of the popular unit testing framework for Java. This course highlights the differences between JUnit4 and JUnit5, covering its modular architecture and new features. With a mix of presentations, examples, and hands-on exercises, you'll learn how to effectively use JUnit5 for test-driven development (TDD).
This course covers the following key topics:
- JUnit5 Architecture and New Features: Understand the differences between JUnit4's monolithic architecture and JUnit5's modular architecture, including the new annotations and features introduced in JUnit5.
- Parameterized and Nested Tests: Learn how to write parameterized tests for better test coverage and use nested tests to organize test cases efficiently.
- Integration with Mockito: Discover how to integrate JUnit5 with Mockito for mocking dependencies.
By the end of this course, participants will be able to:
Master JUnit5 Architecture:
- Describe the architecture and modular components of JUnit5.
Effectively Use JUnit5 in Projects:
- Set up new projects with JUnit5, incorporating the testing framework into your development workflow.
Utilize Advanced Testing Features:
- Implement parameterized tests, tags, and nested tests for more efficient and organized test cases.
Apply TDD Principles:
- Write applications using TDD principles and JUnit5, integrating with Mockito for mocking.
Enroll in the "JUnit5" course to gain a comprehensive understanding of the latest version of the JUnit framework. Through this course, you will enhance your unit testing skills, apply TDD principles, and integrate advanced testing techniques using Mockito. Whether for professional development, academic purposes, or personal interest, this course will equip you with the knowledge and skills necessary to excel in Java unit testing.
Upcoming start dates
Who should attend?
Prerequisites
- Understand principles of object-oriented programming;
- At least one year experience of working with object-oriented languages;
- It is advisable to know Java.
Training content
1. [Theory – 1.5h: Practice – 0.5h] Introducing JUnit 5
• The fundamentals of unit testing
• JUnit 5 architecture
• JUnit 4 vs JUnit 5
• Needed dependencies
• The @Test annotation
2. [Theory – 2.5h: Practice – 4.5h] JUnit 5 New Features and Annotations
• Annotations
• Assertions
• Assumptions
• Dependency Injection in JUnit 5
• Parameterized tests
• Dynamic tests
3. [Theory – 1h: Practice – 2h] Integrating JUnit 5 with Mockito
• Mock objects
• JUnit 5 extensions
• MockitoExtension
• Cucumber overview / BDD
Total: theory 5h (42%), practice 7h (58%)
Certification / Credits
Objectives
After the completion of the course, students will be able to:
- Describe the JUnit 5 architecture;
- Start a project using JUnit 5 as a testing framework;
- Use the JUnit 5 annotations, classes, and methods;
- Write JUnit 5 parameterized tests;
- Use tags;
- Efficiently use JUnit 5 nested tests;
- Write applications that apply TDD principles and use JUnit5.
Quick stats about Luxoft Training Center?
More than 200 training courses
Conducted over 1,500 training sessions
Customized training solutions for business
Contact this provider
Luxoft Training Center
Luxoft Training Center — an essential part of the global technology leader, Luxoft, a DXC Technology Company. We play a pivotal role in propelling B2B businesses forward by delivering customized training solutions. Emphasizing the significance of learning and employee development,...