Testing with F#
Mikael Lundin
- 出版商: Packt Publishing
- 出版日期: 2015-02-27
- 售價: $1,980
- 貴賓價: 9.5 折 $1,881
- 語言: 英文
- 頁數: 282
- 裝訂: Paperback
- ISBN: 1784391239
- ISBN-13: 9781784391232
-
相關分類:
F#
海外代購書籍(需單獨結帳)
相關主題
商品描述
Deliver high-quality, bug-free applications by testing them with efficient and expressive functional programming
About This Book
- Maximize the productivity of your code using the language features of F#
- Leverage tools such as FsUnit, FsCheck, Foq, and TickSpec to run tests both inside and outside your development environment
- A hands-on guide that covers the complete testing process of F# applications
Who This Book Is For
If you are a developer who wants to test applications using F#, this is the book for you. Basic experience of testing and intermediate experience of functional programming in F# is expected.
What You Will Learn
- Set up a test environment in your code base
- Write unit tests, integration tests, and functional tests for F# applications
- Leverage tools such as FsUnit, Foq, Canopy, and TickSpec to run tests both inside and outside your development environment
- Maximize the productivity of your test code using the language features of F#
- Extract dependencies to databases, web services, and other IO bound operations
- Test your applications using executable specifications on a web browser
- Discover the best practices for developing a sustainable test suite
In Detail
Starting with an introduction to the concepts behind test automation, you will learn how to set up your test environment for unit testing and how to execute your test suite within and outside of Visual Studio. Using different test frameworks as MSTest, NUnit, and xUnit, you will learn how to write tests in isolation, create test doubles with Foq, and write expressive assertions with FsUnit.
You will learn techniques used to mock database contexts, test stored procedures, use migrations to test databases in isolation, control a web browser with Canopy, and test web services with F# interactive. You will learn how these techniques apply to Agile principles and discover how testing fits into your project.
商品描述(中文翻譯)
透過高效且表達力強的函數式編程,測試應用程式以交付高品質且無錯誤的應用程式。
關於本書:
- 最大化使用 F# 語言功能來提高程式碼的生產力
- 利用工具如 FsUnit、FsCheck、Foq 和 TickSpec 在開發環境內外運行測試
- 一本實用指南,涵蓋 F# 應用程式的完整測試流程
本書適合對使用 F# 進行測試的開發人員。預期讀者具備基本的測試經驗和中級的 F# 函數式編程經驗。
你將學到:
- 在程式碼庫中建立測試環境
- 為 F# 應用程式撰寫單元測試、整合測試和功能測試
- 利用工具如 FsUnit、Foq、Canopy 和 TickSpec 在開發環境內外運行測試
- 利用 F# 語言功能提高測試程式碼的生產力
- 提取資料庫、網路服務和其他 IO 限制操作的相依性
- 使用可執行的規格在網頁瀏覽器上測試應用程式
- 探索開發可持續測試套件的最佳實踐
詳細內容:
從測試自動化的概念入手,你將學習如何設定單元測試的測試環境,以及如何在 Visual Studio 內外執行測試套件。使用不同的測試框架如 MSTest、NUnit 和 xUnit,你將學習如何獨立撰寫測試、使用 Foq 創建測試替身,以及使用 FsUnit 撰寫表達力強的斷言。
你將學習模擬資料庫內容、測試儲存程序、使用遷移獨立測試資料庫、使用 Canopy 控制網頁瀏覽器,以及使用 F# 互動式測試網路服務。你將了解這些技術如何應用於敏捷原則,並發現測試如何融入你的專案中。