Java Unit Testing with JUnit 5: Test Driven Development with JUnit 5
暫譯: 使用 JUnit 5 的 Java 單元測試:以 JUnit 5 進行測試驅動開發

Shekhar Gulati, Rahul Sharma

商品描述

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. 

Unit testing and test driven development have now become part of every developer's skill set. For Java developers, the most popular testing tool has been JUnit, and JUnit 5 is built using the latest features of Java.  With Java Unit Testing with JUnit 5, you'll master these new features, including method parameters, extensions, assertions and assumptions, and dynamic tests. You'll also see how to write clean tests with less code. 

This book is a departure from using older practices and presents new ways of performing tests, building assertions, and injecting dependencies. 

What You Will Learn
  • Write tests the JUnit 5 way 
  • Run your tests from within your IDE
  • Integrate tests with your build and static analysis tools
  • Migrate from JUnit 4 to JUnit 5

Who This Book Is For

Java developers both with and without any prior unit testing experience.

商品描述(中文翻譯)

探索使用 JUnit 5 進行 Java 測試驅動開發 (TDD) 的新方法來建立和維護測試案例。本書不僅僅談論新概念,還展示了如何在 TDD 和 Java 8 中應用這些概念,以持續交付在各項指標上表現優異的代碼。

單元測試和測試驅動開發現在已成為每位開發者的技能組合的一部分。對於 Java 開發者來說,最受歡迎的測試工具是 JUnit,而 JUnit 5 是基於 Java 的最新特性構建的。通過《Java Unit Testing with JUnit 5》,您將掌握這些新特性,包括方法參數、擴展、斷言和假設,以及動態測試。您還將學會如何用更少的代碼編寫乾淨的測試。

本書脫離了舊有的做法,提出了執行測試、構建斷言和注入依賴的新方法。

您將學到的內容:
- 以 JUnit 5 的方式編寫測試
- 從您的 IDE 中運行測試
- 將測試與構建和靜態分析工具集成
- 從 JUnit 4 遷移到 JUnit 5

本書適合對象:
有無任何先前單元測試經驗的 Java 開發者。