Mockito for Spring

Sujoy Acharya

  • 出版商: Packt Publishing
  • 出版日期: 2015-02-28
  • 售價: $1,170
  • 貴賓價: 9.5$1,112
  • 語言: 英文
  • 頁數: 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的優秀軟體測試人員。