𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Test-Driven Development with Java: Create higher-quality software by writing tests first with SOLID and hexagonal architecture

✍ Scribed by Alan Mellor


Publisher
Packt Publishing
Tongue
English
Leaves
348
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Drive development with automated tests and gain the confidence you need to write high-quality software

Key Features

  • Get up and running with common design patterns and TDD best practices
  • Learn to apply the rhythms of TDD – arrange, act, assert and red, green, refactor
  • Understand the challenges of implementing TDD in the Java ecosystem and build a plan

Book Description

Test-driven development enables developers to craft well-designed code and prevent defects. It’s a simple yet powerful tool that helps you focus on your code design, while automatically checking that your code works correctly. Mastering TDD will enable you to effectively utilize design patterns and become a proficient software architect.

The book begins by explaining the basics of good code and bad code, bursting common myths, and why Test-driven development is crucial. You’ll then gradually move toward building a sample application using TDD, where you’ll apply the two key rhythms -- red, green, refactor and arrange, act, assert. Next, you’ll learn how to bring external systems such as databases under control by using dependency inversion and test doubles. As you advance, you’ll delve into advanced design techniques such as SOLID patterns, refactoring, and hexagonal architecture. You’ll also balance your use of fast, repeatable unit tests against integration tests using the test pyramid as a guide. The concluding chapters will show you how to implement TDD in real-world use cases and scenarios and develop a modern REST microservice backed by a Postgres database in Java 17.

By the end of this book, you’ll be thinking differently about how you design code for simplicity and how correctness can be baked in as you go.

What you will learn

  • Discover how to write effective test cases in Java
  • Explore how TDD can be incorporated into crafting software
  • Find out how to write reusable and robust code in Java
  • Uncover common myths about TDD and understand its effectiveness
  • Understand the accurate rhythm of implementing TDD
  • Get to grips with the process of refactoring and see how it affects the TDD process

Who this book is for

This book is for expert Java developers and software architects crafting high-quality software in Java. Test-Driven Development with Java can be picked up by anyone with a strong working experience in Java who is planning to use Test-driven development for their upcoming projects.

Table of Contents

  1. Building the Case for TDD
  2. Using TDD to Create Good Code
  3. Dispelling Common Myths about TDD
  4. Building a typical application using TDD
  5. Writing our First Test
  6. Following the Rhythms of TDD
  7. Driving Design: TDD and SOLID
  8. Test Doubles: Stubs and Mocks
  9. Hexagonal Architecture: Decoupling external systems
  10. FIRST Tests and the Test Pyramid
  11. Exploring TDD with Quality Assurance
  12. Test First, Test Later, Test Never
  13. Driving the domain layer
  14. Driving the database layer
  15. Driving the Web Layer

πŸ“œ SIMILAR VOLUMES


Test-Driven Development with Java: Creat
✍ Alan Mellor πŸ“‚ Library πŸ“… 2023 πŸ› Packt Publishing 🌐 English

<p><span>Drive development with automated tests and gain the confidence you need to write high-quality software</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Get up and running with common design patterns and TDD best practices</span></span></li><li><span><span>Learn to apply the r

Testing with JUnit: Master high quality
✍ Frank Appel πŸ“‚ Library πŸ“… 2015 πŸ› Packt Publishing 🌐 English

JUnit has matured to become the most important tool when it comes to automated developer tests in Java. Supported by all IDEs and build systems, it empowers programmers to deliver software features reliably and efficiently. However, writing good unit tests is a skill that needs to be learned; otherw

Test-driven iOS development with Swift c
✍ Hauser, Dominik πŸ“‚ Library πŸ“… 2016 πŸ› Packt Publishing 🌐 English

<p><b>Create fully-featured and highly functional iOS apps by writing tests first</b><p><b>About This Book</b><p><li>Learn test-driven principles to help you build apps with fewer bugs and better designs<li>Become more efficient while working with Swift to move on to your next project faster!<li>Lea

Agile Java: Crafting Code with Test-Driv
✍ Langr, Jeff πŸ“‚ Library πŸ“… 2005 πŸ› Prentice Hall 🌐 English

Shows how Java and TDD integrate throughout the entire development lifecycle, helping you leverage efficient development techniques. This work also shows how to translate oral requirements into practical tests, and then how to use those tests to create reliable, high-performance Java code that solve

Java Unit Testing with JUnit 5: Test Dri
✍ Shekhar Gulati, Rahul Sharma πŸ“‚ Library πŸ“… 2017 πŸ› Apress 🌐 English

<p>Explore the new way of building and maintaining test cases with Java test driven development (TDD) using JUnit 5. This book doesn't just talk about the new concepts, it shows you ways of applying them in TDD and Java 8 to continuously deliver code that excels in all metrics. <br/><br/>Unit testin

Agile Java: Crafting Code with Test-Driv
✍ Jeff Langr πŸ“‚ Library πŸ“… 2005 πŸ› Prentice Hall 🌐 English

Master Java 5.0, object-oriented design, and Test-Driven Development (TDD) by learning them together. Agile Java weaves all three into a single coherent approach to building professional, robust software systems. Jeff Langr shows exactly how Java and TDD integrate throughout the entire development l