Test-Driven Development with Java: Create higher-quality software by writing tests first with SOLID and hexagonal architecture
暫譯: 使用 Java 的測試驅動開發:透過先編寫測試以創建更高品質的軟體,並運用 SOLID 與六邊形架構

Mellor, Alan

  • 出版商: Packt Publishing
  • 出版日期: 2023-01-13
  • 售價: $1,700
  • 貴賓價: 9.5$1,615
  • 語言: 英文
  • 頁數: 348
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 180323623X
  • ISBN-13: 9781803236230
  • 相關分類: Java 程式語言TDD 測試導向開發
  • 立即出貨 (庫存=1)

商品描述

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.

商品描述(中文翻譯)

透過自動化測試推動開發,獲得撰寫高品質軟體所需的信心

主要特點

- 快速上手常見的設計模式和測試驅動開發(TDD)最佳實踐

- 學習應用 TDD 的節奏 – 安排、執行、斷言,以及紅、綠、重構

- 理解在 Java 生態系統中實施 TDD 的挑戰並制定計劃

書籍描述

測試驅動開發使開發者能夠編寫設計良好的程式碼並防止缺陷。這是一個簡單但強大的工具,幫助你專注於程式碼設計,同時自動檢查程式碼是否正確運作。掌握 TDD 將使你能夠有效利用設計模式,並成為一名熟練的軟體架構師。

本書首先解釋良好程式碼和不良程式碼的基本概念,打破常見迷思,以及為什麼測試驅動開發至關重要。接著,你將逐步建立一個使用 TDD 的範例應用程式,並應用兩個關鍵節奏——紅、綠、重構和安排、執行、斷言。然後,你將學習如何通過使用依賴反轉和測試替身來控制外部系統,例如資料庫。隨著進展,你將深入探討高級設計技術,如 SOLID 模式、重構和六邊形架構。你還將平衡快速、可重複的單元測試與整合測試,並以測試金字塔作為指導。最後幾章將展示如何在現實世界的使用案例和場景中實施 TDD,並在 Java 17 中開發一個以 Postgres 資料庫為後端的現代 REST 微服務。

在本書結束時,你將以不同的方式思考如何設計簡單的程式碼,以及如何在開發過程中內建正確性。

你將學到什麼

- 發現如何在 Java 中編寫有效的測試案例

- 探索如何將 TDD 融入軟體開發中

- 瞭解如何在 Java 中編寫可重用且穩健的程式碼

- 揭開有關 TDD 的常見迷思並理解其有效性

- 理解實施 TDD 的準確節奏

- 熟悉重構的過程,並了解其對 TDD 過程的影響

本書適合誰

本書適合專業的 Java 開發者和軟體架構師,專注於在 Java 中開發高品質的軟體。《Java 的測試驅動開發》適合任何具有豐富 Java 工作經驗的人,並計劃在即將到來的專案中使用測試驅動開發。

目錄大綱

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

目錄大綱(中文翻譯)

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

最後瀏覽商品 (20)