Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

F#: Automated Testing for Developers

via LinkedIn Learning

This course may be unavailable.

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore techniques for automated software testing in F#. Learn how to improve your test run experience with Ncrunch, work with Unquote to clarify test failures, and more.

Automated testing is a popular topic in software development, but it's still often seen by developers as overhead rather than as an opportunity. By leveraging F# and some external tools and libraries, you can make automated testing easy, enjoyable, and productive. In this course, learn about a variety of techniques for writing automated testing code in F#.
Kit Eason explains how to use xUnit—a .NET unit-testing package—to do some test-driven development, and demonstrates how to improve your test run experience using NCrunch, a test runner. He shows how to use FsCheck to generate test cases, and how to use Expecto to move into the world of tests as first-class values. He also covers the use of Canopy to automate the testing of web user interfaces, and of mocking to tame dependencies.

Syllabus

Introduction
  • Welcome
  • What you should know
  • Working with the sample code
  • Solving issues with early versions of Visual Studio 2017
1. Introducing Automated Testing
  • What are automated tests and why do they matter?
2. Classical Unit Testing with F#
  • Creating a testable project and installing Paket and xUnit
  • Creating your first tests
  • Test driving an implementation: Part 1
  • Test driving an implementation: Part 2
  • Providing functional dependencies to tests
  • Exercise: Removing nulls from your implementation
  • Exercise solution: Removing nulls from your implementation
3. Improving Your Test Run Experience with NCrunch
  • Introducing NCrunch: A marvelous test runner
  • Organizing tests in NCrunch
  • Exercise: Extending test coverage
  • Exercise solution: Extending test coverage
4. Going Beyond Test Cases with FsCheck and Unquote
  • Introducing property-based testing with FsCheck
  • Applying property-based testing
  • Supplying additional values
  • Controlling FsCheck test data generation
  • Exercise: Writing an FsCheck test using a generator
  • Exercise solution: Writing an FsCheck test using a generator
  • Using Unquote to clarify test failures
5. Making Tests First Class Using Expecto
  • Introducing first-class tests with Expecto
  • Writing tests in Expecto
  • Writing property-based tests in Expecto
  • Exercise: Converting tests to use Expecto
  • Exercise solution: Converting tests to use Expecto
6. Using Mocking to Tame Dependencies
  • Introducing mocking with Foq
7. User Interface Testing
  • Web UI testing with Canopy
Conclusion
  • Next steps

Taught by

Kit Eason

Reviews

Start your review of F#: Automated Testing for Developers

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.