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.
Test Driven Development (TDD) and Unit Testing Essentials
Course Description
Overview
Test Driven Development (TDD) and Unit Testing Essentials is a three-day, comprehensive hands-on test-driven development / JUnit / TDD training course geared for developers who need to get up and running with essential Test-driven development programming skills using JUnit and various open-source testing frameworks. Throughout the course you'll learn, explore and gain practical experience working with best practices for writing great programs in Java, using test-driven development techniques. This course quickly introduces you to the core features and benefits of JUnit. You'll leave this course armed with the skills required to leverage solid test driven development and unit testing techniques, using the latest industry techniques and best practices.Objectives
- The role of Unit Testing in software development and testing
- How to write effective Unit Testing
- The properties of effective unit tests
- The benefits of the test-first and Test-Driven Development
- Techniques and practices to aid in the successful adoption of Test-Driven Development
- JUnit and the JUnit Test Runner interface.
- How to use JUnit to drive the implementation of Java code.
- The role of debugging when done in conjunction with tests.
- The fundamentals of the TDD using Java, as well as its importance, uses, strengths and weaknesses.
- Understand how JUnit affects your perspective on development and increases your focus on a task.
- Good JUnit coding style.
- How to Create well-structured JUnit programs.
- How to Compile and execute programs using JUnit and DBUnit
- How to extend testing with mock objects using Mockito.
- Refactoring techniques available to make code as reusable/robust as possible.
- Various testing techniques.
Audience
Topics
- Rationale for TDD
- The process of TDD
- Advantages to TDD
- Side-effects of TDD
- Tools to support TDD
- Tutorial: Setup IntelliJ for Using Maven
- 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
- Test Result Verification (Assertions)
- Manage fixtures using @BeforeEach, @AfterEach, @BeforeAll and @AfterAll annotations
- Maven setup using Surefire plugin
- Lab: Demo JUnit
- Lab: Build JUnit Case Study
- Lab: Jumpstart JUnit
- Use @DisplayName to specify a custom name for the test
- Check for exceptions thrown by test
- Use @Disabled to prevent a test class or method from running
- Use timeouts to fail test that take longer than required
- Test Execution Order
- 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
- Define different sources for test data (@ValueSource, @CsvSource, @CsvFileSource,@EnumSource, @MethodSource, @ArgumentSource)
- Lab: Working with Parameterized Tests
- JUnit 4 vs JUnit 5
- Nested Unit Tests
- Repeated Tests
- JUnit Extensions
- ExecutionConditions
- 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
- Mockito Description and Features
- Mockito Object Lifecycle
- JUnit 5 and Mockito Dependency Injection
- Stubs Using ArgumentMatchers
- Verifying Behavior in Mockito
- Partial Mock Objects
- The Spy annotation
- Lab: Mock Object and Mockito
- PowerMock Description and Features
- Using PowerMockito
- @PrepareForTest
- Mocking a final class or final method
- Mocking a Static Method
- State-based Testing
- Interaction-based Testing
- Mock Objects Support Each Approach
- Three Areas to Check in a Test
- Lab: Interaction-based Testing
- Refactoring Overview
- Refactoring and Testing
- Refactoring to Design Patterns
- Lab: Refactoring
- Lab: Best Practices - Refactoring Tests
- Setting up DbUnit
- Defining a Dataset File in XML, CSV or Excel
- Writing a DbUnit Test Class
- Assert the results
- Use the FailureHandler and ValueComparer
- Using Date and Time in test sets
- Export a data set
- Lab: Introduction to DbUnit
- Lab: DbUnit Assertions
- Lab: Selenium and DbUnit
Related Courses
-
Behavior and Test Driven Development using Junit
EJCJ-540- Duration: 3 Days
- Delivery Format: Classroom Training
- Price: 1,755.00 USD
-
Java Testing with JUnit 5
EJCJ-600- Duration: 2 Days
- Delivery Format: Classroom Training, Online Training
- Price: 1,170.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.