Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Testing with f#
  • Table Of Contents Toc
Testing with f#

Testing with f#

By : Mikael Lundin
3.7 (3)
close
close
Testing with f#

Testing with f#

3.7 (3)
By: Mikael Lundin

Overview of this book

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.
Table of Contents (12 chapters)
close
close
11
Index

FAKE

The point of being able to run tests outside Visual Studio is not something you will have to do very often, but it is an absolute requirement to run your tests in a build script.

FAKE is a build automation system similar to the make of C and the rake of Ruby, featuring F# with a specific Domain Specific Language (DSL) to set up build scripts fast and easy.

To get started, install the NuGet package for FAKE in your solution. You don't have to add it to any particular project. This is shown in the following screenshot:

FAKE

The package will install itself on the solution directory path, packages\FAKE.3.5.5\tools. Now, in the solution level, create a new F# script file called build.fsx:

// define includes
#I @"packages/FAKE.3.5.5/tools/"
#r @"FakeLib.dll"
open Fake
open Fake.FileUtils

// constants
let buildDir = "./build"
let deployDir = "./deploy"

// define targets
Target "Clean" (fun _ ->
    CleanDirs [buildDir; deployDir]
)

// define...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Testing with f#
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon