title
Please take a moment to fill out this form. We will get back to you as soon as possible.
All fields marked with an asterisk (*) are mandatory.
Unit Testing Essentials using JUnit 5 and EasyMock (with Best Practices)
Course Description
Overview
JUnit 5 and EasyMock make it possible to write higher-quality Java code. These powerful tools are designed to support robust, predictable and automated testing development in the Java enterprise application arena.Unit Testing Essentials using JUnit 5 and EasyMock is a three-day, hands-on unit testing course geared for experienced developers who need to get up and running with essential unit testing skills using JUnit, EasyMock, and other tools. Students will leave the course armed with the skills required to leverage solid unit testing practices using the latest industry techniques and best practices. This course quickly introduces developers to the features of JUnit and educates them regarding JUnit’s strengths and weaknesses.
Objectives
- Understand what unit testing is and what it is not intended to cover
- Understand JUnit 5.
- Understand and use the JUnit Test Runner interface.
- Use JUnit to drive the implementation of Java code.
- Test applications using native IDE support.
- Best practices and patterns for unit testing.
- Understand JUnit’s strengths and weaknesses
- Understand the role of debugging when done in conjunction with tests.
- Understand not only the fundamentals of the TDD using Java, but also its importance, uses, strengths and weaknesses.
- Understand how JUnit affects your perspective on development and increases your focus on a task.
- Learn good JUnit coding style.
- Create well-structured JUnit programs.
- Understand how JUnit testing can be used for either state-based or interaction-based testing.
- How to extend testing with mock objects using EasyMock.
- Look at refactoring techniques available to make code as reusable/robust as possible.
- Discuss various testing techniques.
- JUnit 5, Mockito and PowerMock
Audience
Topics
- Introduce Test Driven Development
- Purpose of Unit Testing
- Good Unit Tests
- Test Stages
- Unit Testing Vs Integration Testing
- Understanding Unit Testing Frameworks
- Understand and work with the features of JUnit
- Write unit tests using @Test annotation
- Use @DisplayName to specify a custom name for the test
- Manage fixtures using @BeforeEach, @AfterEach, @BeforeAll and @AfterAll annotations
- Launch tests using @ExtendWith (@RunWith – JUnit 4+) annotation
- Build test suites using @SelectPackages or @SelectClasses
- Use @Disabled to prevent a test class or method from running
- Lab: Demo JUnit
- Lab: Build JUnit Case Study
- Lab: Jumpstart JUnit
- Lab: Reapplying JUnit
- Describe the test execution cycle
- Check for exceptions thrown by test
- Use timeouts to fail test that take longer than required
- Lab: Working with @Test Annotation
- Learn the notation of assertThat
- Know the objective of Hamcrest library
- Use Hamcrest's logical and object matchers
- Use Hamcrest's number and collection matchers
- Lab: Working with Hamcrest
- The @ParameterizedTest annotation
- A parameterized test to test code under several conditions
- Generic tests to support parameterized testing
- Lab: Working with Parameterized Tests
- Nested Unit Tests
- Repeated Tests
- JUnit Extensions
- Conditions
- Lambda Support
- Grouped Assertions
- Lab: Working with Advanced Features
- 'Good' Tests
- Bad Smell
- White-Box Unit Testing
- Black-Box Unit Testing
- Automation and Coverage
- Why We use Test Dummies
- Mock Objects
- Working with Mock Objects
- Using Mocks with the User Interface
- Mock Object Strategies
- EasyMock Description and Features
- EasyMock Object Lifecycle
- Create/Expect Phase
- Replay/Verify Phase
- Mocking Complex Objects
- EasyMock HOWTO
- Lab: Mock Objects and EasyMock
- Lab: Working With EasyMock
- PowerMock Description and Features
- PowerMock Object Lifecycle
- Mocking a Static Method
- Refactoring Overview
- Refactoring and Testing
- Refactoring to Design Patterns
- Naming conventions
- Lab: Refactoring
- Lab: Best Practices - Refactoring Tests
- JUnit and Ant
- The Ant JUnit Tag
- Running JUnit Tests From Ant
- Generating a JUnitReport
Related Courses
-
Behavior and Test Driven Development using Junit
EJCJ-540- Duration: 3 Days
- Delivery Format: Classroom Training
- Price: 1,755.00 USD
-
Test Driven Development (TDD) and Unit Testing Essentials
EJCJ-521- Duration: 3 Days
- Delivery Format: Classroom Training, Online Training
- Price: 1,755.00 USD
Self-Paced Training Info
Learn at your own pace with anytime, anywhere training
- Same in-demand topics as instructor-led public and private classes.
- Standalone learning or supplemental reinforcement.
- e-Learning content varies by course and technology.
- View the Self-Paced version of this outline and what is included in the SPVC course.
- Learn more about e-Learning
Course Added To Shopping Cart
bla
bla
bla
bla
bla
bla
Self-Paced Training Terms & Conditions
Exam Terms & Conditions
Sorry, there are no classes that meet your criteria.
Please contact us to schedule a class.

STOP! Before You Leave
Save 0% on this course!
Take advantage of our online-only offer & save 0% on any course !
Promo Code skip0 will be applied to your registration
Purchase Information
title
Please take a moment to fill out this form. We will get back to you as soon as possible.
All fields marked with an asterisk (*) are mandatory.