FSharpTest: F# VS Test Project Template

Update Nov. 30, 2013: v1.2 adds VS 2013 support.

Update Nov. 10, 2013: v1.1 adds links to documentation (and just realized I forgot link to NUnit docs) and more samples of FsUnit and FsCheck, including stateful testing.

I finally did something about scratching an itch I’ve had for some time, that is to create an F# test project template, and I have released it upon the world as FSharpTest. No more fumbling around installing all the NuGet packages and opening another of my projects to see how to implement model test cases when I want to add a test project to a Visual Studio solution .

The Components

NUnit is my “go to” test framework and FsUnit lets me write test assertions in a more fluent composeable style. FsCheck and Unquote round-out the template with failing test case examples.

This is a first release to get community feedback, so let me know what you think. It occurred to me I don’t have a sample test case of FsUnit at work, and I should have added links to all the included test tool docs in the code comments, something for the next release. I also want to add more FsCheck technique examples including Stateful Testing and include TickSpec, as soon as I become familiar with that tool.

The available F# testing tools are really first class and I hope this makes it easier and faster for people to bring up tests.

Under the Covers

If you want to create your own distributable VS extension you will need to install the Visual Studio SDK. Here is the article on how to create project templates and you will find the template parameters reference helpful as well.

A template is a handy thing, but if you want to share it you need to wrap it in an
installable project template extension by using the VSIX project template. The steps in this article are pretty complete, but I never did find the “Content” section it talks about, and it doesn’t explicitly explain you have to add the template zip file to the project through the “Assets” tab.

Hackit Yurself

You can actually hack-up a VSIX file by changing its file type to “zip” and editing the contents. In fact that’s mostly how I crafted the entire template. Once you create the original template zip just edit the files and add NuGet packages in the root.

Now that you know that secret you can modify this extension to your own liking, but do let me know how you customize it so I can benefit too and consider putting the changes in future releases.

F# for Functional Enthusiasts Bibliography

Bibliograhy and slides for my talk to the Bay Area Clojure User Group .

Type Providers

F# Type Providers

F# R Provider

Visualize World Bank data in R with F# Type Providers

Types, Constraints, and Generics

Engineering Random Bits: F# Generics

The “Designing with types” series

Active patterns and member constraint

Type hackery

Help build optional type systems for Clojure and Clojurescript.

Type system as expressing intent 16:00

Eager Rose Tree, Vector, Parsing, Computational Expressions

Eager Rose Tree




{m}brace demos

Community-Driven Development

The F# Software Foundation

FAKE – F# Make

F# Formatting: Documentation tools

FunScript : F# to JavaScript with type providers

Charting World Bank data with F#

Develop CUDA applications

F# quotations to OpenCL translation

Web client to #websharper channel

Development Alternatives

Tsunami IDE

Missile Command playable in tsunami.io

Configuring Sublime Text 2 To Work With FSharp

Create iOS, Android, Mac and Windows apps

Using Sublime Text 2 as F# REPL


IKVM.NET Home Page

Building a Java VM on the .NET Framework

Learning F#

F# Programming

A Course of F# Study

A directory of useful pages

F# Cheatsheet

Visual F#

Coming in F# 3.1