Java Testing with Spock

Konstantinos Kapelonis

  • 出版商: Manning
  • 出版日期: 2016-03-27
  • 定價: $1,520
  • 售價: 9.5$1,444
  • 語言: 英文
  • 頁數: 304
  • 裝訂: Paperback
  • ISBN: 1617292532
  • ISBN-13: 9781617292538
  • 相關分類: 軟體測試Java 程式語言
  • 立即出貨 (庫存 < 3)

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

相關主題

商品描述

Summary

Java Testing with Spock teaches you how to use Spock for a wide range of testing use cases in Java. Readers new to Groovy will appreciate the succinct language tutorial that'll give you just enough Groovy to use Spock effectively.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Spock combines the features of tools like JUnit, Mockito, and JBehave into a single powerful Java testing library. With Spock, you use Groovy to write more readable and concise tests. Spock enables seamless integration testing, and with the intuitive Geb library, you can even handle functional testing of web applications.

About the Book

Java Testing with Spock teaches you how to use Spock for a wide range of testing use cases in Java. You'll start with a quick overview of Spock and work through writing unit tests using the Groovy language. You'll discover best practices for test design as you learn to write mocks, implement integration tests, use Spock's built-in BDD testing tools, and do functional web testing using Geb. Readers new to Groovy will appreciate the succinct language tutorial in chapter 2 that gives you just enough Groovy to use Spock effectively.

What's Inside

  • Testing with Spock from the ground up
  • Write mocks without an external library
  • BDD tests your business analyst can read
  • Just enough Groovy to use Spock
  • About the Reader

    Written for Java developers. Knowledge of Groovy and JUnit is helpful but not required.

    About the Author

    Konstantinos Kapelonis is a software engineer who works with Java daily.

    Table of Contents

    PART 1 FOUNDATIONS AND BRIEF TOUR OF SPOCK
  • Introducing the Spock testing framework
  • Groovy knowledge for Spock testing
  • A tour of Spock functionality
  • PART 2 STRUCTURING SPOCK TESTS
  • Writing unit tests with Spock
  • Parameterized tests
  • Mocking and stubbing
  • PART 3 SPOCK IN THE ENTERPRISE
  • Integration and functional testing with Spock
  • Spock features for enterprise testing
  • 商品描述(中文翻譯)

    《Java Testing with Spock》教你如何在Java中使用Spock進行各種測試。對於不熟悉Groovy的讀者來說,本書提供了簡潔的語言教程,讓你能夠有效地使用Spock。

    購買印刷版書籍還包括Manning Publications提供的PDF、Kindle和ePub格式的免費電子書。

    Spock將JUnit、Mockito和JBehave等工具的功能結合到一個強大的Java測試庫中。使用Spock,你可以使用Groovy編寫更易讀且簡潔的測試。Spock支持無縫集成測試,並且通過直觀的Geb庫,你甚至可以處理Web應用程序的功能測試。

    《Java Testing with Spock》教你如何在Java中使用Spock進行各種測試。你將從快速概述Spock開始,並通過使用Groovy語言編寫單元測試進行實踐。在學習編寫模擬對象、實現集成測試、使用Spock內置的BDD測試工具以及使用Geb進行功能Web測試的過程中,你將發現測試設計的最佳實踐。對於不熟悉Groovy的讀者來說,第2章提供了簡潔的語言教程,讓你能夠有效地使用Spock。

    內容包括:
    - 從頭開始使用Spock進行測試
    - 不使用外部庫編寫模擬對象
    - 你的業務分析師也能讀懂的BDD測試
    - 足夠的Groovy知識來使用Spock

    本書適合Java開發人員閱讀。了解Groovy和JUnit將有所幫助,但不是必需的。

    作者Konstantinos Kapelonis是一名每天都使用Java的軟體工程師。

    目錄:
    第1部分 基礎和Spock簡介
    - 介紹Spock測試框架
    - Spock測試所需的Groovy知識
    - Spock功能概述

    第2部分 Spock測試的結構
    - 使用Spock進行單元測試
    - 參數化測試
    - 模擬和存根

    第3部分 Spock在企業中的應用
    - 使用Spock進行集成和功能測試
    - 企業測試的Spock功能