Testing with F#
- Length: 282 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2015-02-23
- ISBN-10: 1784391239
- ISBN-13: 9781784391232
- Sales Rank: #4677769 (See Top 100 Books)
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.
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.
Table of Contents
Chapter 1. The Practice of Test Automation
Chapter 2. Writing Testable Code with Functional Programming
Chapter 3. Setting Up Your Test Environment
Chapter 4. Unit Testing
Chapter 5. Integration Testing
Chapter 6. Functional Testing
Chapter 7. The Controversy of Test Automation
Chapter 8. Testing in an Agile Context
Chapter 9. Test Smells
Chapter 10. The Ten Commandments of Test Automation