Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt

Test Driven Development (TDD) and Unit Testing / JUnit Essentials (TT3503)

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.

  • Price: $1,995.00
  • Duration: 1 day
  • Delivery Methods: Virtual
Date Time Price Option
Please contact us at info@toptalentlearning.com or 469-721-6100 for this course schedule.
For questions call: (469) 721-6100

Why choose
TOPTALENT?

  • Get assistance every step of the way from our Texas-based team, ensuring your training experience is hassle-free and aligned with your goals.
  • Access an expansive range of over 3,000 training courses with a strong focus on Information Technology, Business Applications, and Leadership Development.
  • Have confidence in an exceptional 95% approval rating from our students, reflecting outstanding satisfaction with our course content, program support, and overall customer service.
  • Benefit from being taught by Professionally Certified Instructors with expertise in their fields and a strong commitment to making sure you learn and succeed.

Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most.

Session: Introducing Test-driven Development

Lesson: Test-Driven Development

  • Rationale for TDD
  • The process of TDD
  • Advantages to TDD
  • Side-effects of TDD
  • Tools to support TDD
  • Tutorial: Setup IntelliJ for Using Maven OR Using Eclipse Tutorial

Session: Unit Testing using JUnit

Lesson: Unit Testing Fundamentals

  • Purpose of Unit Testing
  • Good Unit Tests
  • Test Stages
  • Unit Testing Vs Integration Testing
  • Understanding Unit Testing Frameworks

Lesson: Jumpstart: JUnit 5.x

  • 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

Lesson: Annotations

  • 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

Lesson: Hamcrest

  • 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

Lesson: Parameterized Tests

  • 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

Lesson: Advanced Features

  • JUnit 4 vs JUnit 5
  • Nested Unit Tests
  • Repeated Tests
  • JUnit Extensions
  • ExecutionConditions
  • Lambda Support
  • Grouped Assertions
  • Lab: Working with  Advanced Features

Lesson: JUnit Best Practices

  • “Good” Tests
  • Bad Smell
  • White-Box Unit Testing
  • Black-Box Unit Testing
  • Automation and Coverage

Session: Mocking

Lesson: Mocking of Components

  • Why We use Test Dummies
  • Mock Objects
  • Working with Mock Objects
  • Using Mocks with the User Interface
  • Mock Object Strategies

Lesson: Mock Objects and Mockito

  • 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

Lesson: PowerMock

  • PowerMock Description and Features
  • Using PowerMockito
  • @PrepareForTest
  • Mocking a final class or final method
  • Mocking a Static Method

Session: Advanced Topics

Lesson: State-based vs. Interaction-based Testing

  • State-based Testing
  • Interaction-based Testing
  • Mock Objects Support Each Approach
  • Three Areas to Check in a Test
  • Lab: Interaction-based Testing

Lesson: Improving Code Quality Through Refactoring

  • Refactoring Overview
  • Refactoring and Testing
  • Refactoring to Design Patterns
  • Lab: Refactoring
  • Lab: Best Practices – Refactoring Tests

Lesson: Database Testing: DbUnit

  • 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 (OPTIONAL): Selenium and DbUnit

Throughout the course, you’ll work on a project with labs specifically oriented towards using TDD to implement a complex and multi-faceted web application that uses a database in its final form. Working in a hands-on learning enviroment you’ll explore:

  • 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.

Need different skills or topics?  If your team requires different topics or tools, additional skills or custom approach, this course may be further adjusted to accommodate.  We offer additional unit testing, TDD, BDD, programming, testing tools, test automation, QA, services, security and other related topics that may be blended with this course for a track that best suits your needs. Our team will collaborate with you to understand your needs and will target the course to focus on your specific learning objectives and goals.

This programming course is for experienced Java developers.

This programming course is for experienced Java developers. Please see the Related Courses tab for specific Pre-Requisite courses, Related Courses that offer similar skills or topics, and next-step Learning Path recommendations.

Ten (10) business days’ notice is required to reschedule a class with no additional fees. Notify TOPTALENT LEARNING as soon as possible at 469-721-6100 or by written notification to info@toptalentlearning.com to avoid rescheduling penalties.
Please contact our team at 469-721-6100; we will gladly guide you through the online purchasing process.
You will receive a receipt and an enrollment confirmation sent to the email you submitted at purchase. Your enrollment email will have instructions on how to access the class. Any additional questions our team is here to support you. Please call us at 469-721-6100.
If a student is 15 minutes late, they risk losing their seat to a standby student. If a student is 30 minutes late or more, they will need to reschedule. A no-show fee will apply. Retakes are enrolled on a stand-by basis. The student must supply previously issued courseware. Additional fees may apply.
You will receive a ‘Certificate of Completion’ once you complete the class. If you purchased an exam voucher for the class, a team member from TOPTALENT LEARNING will reach out to discuss your readiness for the voucher and make arrangements to send it.