Mockito for Spring
暫譯: Spring 的 Mockito 使用指南

Sujoy Acharya

  • 出版商: Packt Publishing
  • 出版日期: 2015-02-28
  • 售價: $1,260
  • 貴賓價: 9.5$1,197
  • 語言: 英文
  • 頁數: 164
  • 裝訂: Paperback
  • ISBN: 1783983787
  • ISBN-13: 9781783983780
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Learn all you need to know about the Spring Framework and how to unit test your projects with Mockito

About This Book

  • Learn about the Spring testing framework, stubbing, mocking, and spying dependencies using the Mockito framework and explore its advanced features
  • Create an automated JUnit safety net for building a reliable, maintainable, and testable software
  • Step-by-step tutorial stuffed with real-world examples

Who This Book Is For

If you are an application developer with some experience in software testing and want to learn more about testing frameworks, then this technology and book is for you. Mockito for Spring will be perfect as your next step towards becoming a competent software tester with Spring and Mockito.

What You Will Learn

  • Uncover the architecture of the Spring testing framework and write integration tests
  • Explore test doubles and work with dummy, spy, fake, stub, and mock objects
  • Mock Spring container dependencies using Mockito
  • Refresh your Spring Framework knowledge
  • Learn about the advanced Spring 4 Framework features
  • Work with the REST controller to build and unit test RESTful web services
  • Cache data with Spring and EhCache

In Detail

Mockito is a testing framework that creates external dependencies; this process is called mocking. This book will provide you with the skills you need to successfully build and maintain meaningful unit and integration test cases for Spring Framework code. This book starts with a brief introduction to the Spring Framework, including its components and architecture.

Packed with real-world examples, the book covers how to make Spring code testable and mock container and external dependencies using Mockito. You then get a walkthrough of the steps that will help you in applying Spring 4 Framework features and advanced Spring testing module features in the real world. By the end of the book, you will be a competent software tester with Spring and Mockito.

商品描述(中文翻譯)

學習有關 Spring Framework 的所有知識,以及如何使用 Mockito 進行單元測試

本書介紹



  • 了解 Spring 測試框架、使用 Mockito 框架進行存根、模擬和監視依賴,並探索其進階功能

  • 為構建可靠、可維護和可測試的軟體創建自動化的 JUnit 安全網

  • 逐步教程,充滿真實世界的範例

本書適合誰


如果您是一位具有一定軟體測試經驗的應用程式開發人員,並希望深入了解測試框架,那麼這本書非常適合您。Mockito for Spring 將是您成為一名合格的 Spring 和 Mockito 軟體測試員的下一步。

您將學到什麼



  • 揭示 Spring 測試框架的架構並撰寫整合測試

  • 探索測試替身,並使用虛擬、監視、假、存根和模擬物件

  • 使用 Mockito 模擬 Spring 容器依賴

  • 刷新您的 Spring Framework 知識

  • 了解進階的 Spring 4 Framework 功能

  • 使用 REST 控制器構建和單元測試 RESTful 網路服務

  • 使用 Spring 和 EhCache 快取數據

詳細內容


Mockito 是一個創建外部依賴的測試框架;這個過程稱為模擬。本書將提供您成功構建和維護有意義的單元和整合測試案例所需的技能,針對 Spring Framework 代碼。本書以簡要介紹 Spring Framework 開始,包括其組件和架構。


本書充滿真實世界的範例,涵蓋如何使 Spring 代碼可測試,並使用 Mockito 模擬容器和外部依賴。接著,您將獲得應用 Spring 4 Framework 功能和進階 Spring 測試模組功能的步驟指導。在本書結束時,您將成為一名合格的 Spring 和 Mockito 軟體測試員。