Test Driven Development (TDD), and Refactoring Legacy Code Using Java

Hands on Technical Training (HOTT)
Training overview
Professional Course
4 days
From 2,295 USD
Start dates
Online
Inquire for more information

Bakersfield
2,295 USD
7/20/2020

Fresno
2,295 USD
7/20/2020

Modesto
2,295 USD
7/20/2020

Course description

Test Driven Development (TDD), and Refactoring Legacy Code Using Java

This course provides students with hands on experience learning Test Driven Development (TDD) using JUnit. Students will build unit tests using mocks, fakes, stubs and drivers, and address issues working with databases and other systems. Student will create tests and code that will be more likely to meet and exceed requirements. Code that receives “test coverage” will not break existing systems, because tests are passed before code is checked in.

Students will spend time working with the issues involved in refactoring legacy code, safely cutting into an already deployed system. Students will work on looking for, or creating “seams” to more safely improve code or add features, and work on identifying “code smells” that need attention in a productive system.

Finally, students will explore dependency issues as well as techniques to better understand and improve complex systems.

Students will also examine TDD and refactoring legacy code in other languages like C# to gain a broader view of options and issues working in a multi-language shop. Comprehensive labs using Java provide facilitated hands on practice crucial to developing competence and confidence with the new skills being learned.

Delivery method

  • Attend face-to-face in the classroom
  • Remote-live (live, instructor-led training from the convenience of your home or office)
  • On-demand streaming (train on your own time and at your own pace)
Want to find out more?

COVID-19 Update

In light of COVID-19, this provider is now delivering some or all of their courses online. Contact them for more information!

Who should attend?

Prerequisites

Java SE 5+ programming experience and an understanding of object-oriented design principles. The Java Programming course or equivalent knowledge provides a solid foundation.

Training content

Why TDD? Think Twice, Write Production Code Once

  • Utilizing a Safety Net of Automated Testing
  • Agile Development Concepts
  • Eliminating Bugs Early
  • Smoothing Out Production Rollouts
  • Writing Code Faster via Testing
  • Reducing Technical Debt
  • Practicing Emergent Design
  • Making Changes More Safe
  • The Importance of Regression Testing

Basic Unit Testing

  • JUnit
  • 3.x vs 4.0 JUnit Testing
  • Adding Complexity to Initial Simple Tests
  • Making Tests Easy to Run
  • The TDD Pattern: Red, Green Refactor
  • Using Methods of the Assert Class
  • Boundary Testing
  • Unit Test Limitations

Comprehensive Unit Testing Concepts

  • Using Declarative-Style Attributes
  • Using Hamcrest Matchers for More Complex Scenarios
  • Using Test Categories
  • Exception Handling in Tests
  • JUnit Test Initialization and Clean Up Methods
  • Writing Clean and Dirty Tests
  • Testing with Collections, Generics and Arrays
  • Negative Testing

Mocks, Fakes, Stubs and Drivers

  • TDD Development Patterns
  • Naming Conventions for Better Code
  • Using Mock Objects
  • Using Fakes
  • Using Stubs
  • Test Doubles
  • Manual Mocking
  • Mocking with a Mock Framework
  • Self-Shunt Pattern

Database Unit Testing

  • Mocking the Data Layer
  • Identifying what Should Be Tested in Databases
  • Stored Procedure Tests
  • Schema Testing
  • Using NDbUnit to Set Up the DB Test Environment

Refactoring Basics

  • Refactoring Existing Code
  • Restructuring
  • Extracting Methods
  • Removing Duplication
  • Reducing Coupling
  • Division of Responsibilities
  • Improving Clarity and Maintainability
  • Test First - then Refactor
  • More Complex Refactoring Considerations

Patterns and Anti-Patterns in TDD

  • The SOLID Principles
  • Factory Methods
  • Coding to Interface References
  • Checking Parameters for Validity Test
  • Open/Closed Principle: Open to Extension, Closed to Change
  • Breaking Out Method/Object
  • Extract and Override Call
  • Extract and Override Factory Method
  • Singleton Pattern
  • Decorator Pattern
  • Facade Pattern
  • State Pattern
  • MVP, MVC and MVVM Patterns
  • Finding and Removing Code Smells/Antipatterns

Refactoring Legacy Code

  • Reducing Risk of Change
    • Eliminating Dependencies
    • Characterization Tests as a Safety Net
    • Introducing Abstractions to Break Dependencies
  • Analyzing Legacy Code
    • Identifying Pinch Points with Effect Analysis
    • Identifying Seams for Expansion and Testing
    • Listing Markup
  • Minimizing Risk of Adding New Behavior
    • Sprout Method
    • Sprout Class
    • Wrap Method
    • Wrap Class
  • Dealing with Code that's Difficult to Test
    • Global and Singletons in Tests
    • Inaccessible Methods and Fields
  • Using Smells to Identify What to Refactor
    • Dealing with Monster Methods
    • Dealing with Excessively Complex, Large Classes
    • Identifying and Eliminating Duplication
    • Other Smells
  • Dealing with Large Legacy Systems
    • Preserving Signatures

Code Coverage

  • White Box vs Black Box Testing
  • Planning to Increase Code Coverage Over Time
    • Goal 80% or More Test Coverage
    • Statement Coverage
    • Condition Coverage
    • Path Coverage
  • Test Harnesses
  • Unit-Testing Harnesses

System, Regression and Acceptance Testing

  • Statistical Sampling
  • Usability Testing
  • Test Protocols
  • Regression Testing
  • Acceptance Testing

Continuous Integration Servers/Automated Testing

  • Early Warning of Conflicts
  • Metrics and Tools
  • Checking into Repository
    • Team Foundation Server (TFS)
    • Subversion
  • Continuous Integration Servers
    • CruiseControl.NET
    • Hudson
  • Automating the Build/Deployment

Risks Changing Legacy/Production Systems

  • Refactoring
  • Coupling and Cohesion Issues
  • Taking Small Tested Steps
  • Anti-Pattern: Big Bang, Boom

Why choose HOTT?

50% of class time is hands-on lab exercises

Public classes average less than 12 students

Courses cover over 60 different subject areas

About HOTT

HOTT Logo

Hands On Technology Transfer, Inc. (HOTT)  

We offer competency-based IT training programs in more than 100 cities across the United States, Canada and the United Kingdom, covering over 60 IT subject areas. These programs are designed with one main goal – making sure you and your staff...


Read more and show all training delivered by this supplier

Request info

Fill out your details to find out more about Test Driven Development (TDD), and Refactoring Legacy Code Using Java.

  Contact the provider

  Get more information

  Register your interest

Contact info

Hands on Technical Training (HOTT)


 Show phone number
www.traininghott.com


Reviews

Average rating 5

Based on 2 reviews

T.C., Fidelity Investments
(5)
Class was great and very well paced. We had a small class size so there was a lot of detailed explanation. Would recommend HOTT to anyone.
Participant
(5)
Outstanding course with dynamic teacher! Was not expecting to get much out of this before starting the course but had expectations turned around on the first day. Changed my perspective on the subject of TDD through knowledge. Great course. Great instructor!
Request Information

Have a question about this course? Fill out this form and the provider will get in touch with you shortly

View again
Supplier Directory
Join our Supplier Directory to:
- Gain Traffic
- Get Noticed
- Showcase Your Services
- Free Listing Available