Matthew Podwysocki

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
FsTest Updated with F# CTP

Back in June, I announced the creation of FsTest, a testing Domain Specific Language for F#.  Since that time, the F# team has released the September 2008 CTP, which finally gives F# full citizenship within Visual Studio with real project files.  I felt it was time to update FsTest, and more in particular, FsxUnit, which uses xUnit.net as the back end for doing assertions.  Go ahead and pick up the latest bits here from the CodePlex site.


What's Changed?

Other than migrating the code to the new F# project formats, the migration was rather smooth.  As I have mentioned before, order still matters in your F# projects.  But luckily Visual Studio now gives you the opportunity to not only add files above and below, but to move files up and down as well, as shown below:

fsharp_updown

Code changes were pretty minimal.  There were a few instances in which I had to change the method signature slightly in the interface file, such as the following.

Before

/// Determine whether the collection is empty
val Empty : #System.Collections.IEnumerable -> unit

After

/// Determine whether the collection is empty
val Empty : System.Collections.IEnumerable -> unit

The difference between the two being that the before has a signature which looks like this:

val Empty<'a when 'a:> System.Collections.IEnumerable>

 

And having it specified that way does not work properly, whereas it did in the previous versions of F#.  There were several instances I removed the # in front of the seq and IEnumerable classes.  Note that none of the calling code in any of my tests had to change one bit, so if you've been using it, there should be no issues arising.

Since the time I unveiled FsTest, xUnit.net, my favorite unit testing framework, has released version 1.02, which covered minor bug fixes.  After updating the references and fixing those slight issues, I'm able to run the xUnit.net GUI runner and get the green lights which is always joy:

xunit_success


Where to Go From Here?

So, where do I go from here?  I'm still looking to move this more towards a BDD style, instead of just the DSL syntax for the assertions.  Taking some ideas still from RSpec and Scala Specs is my goal to make this a more complete solution.  It's still a work in progress, but the real question, what works for you?  What doesn't?  Where should it go?  I have some ideas, but feedback is always appreciated.


Posted 09-04-2008 8:29 PM by Matthew.Podwysocki

[Advertisement]

Comments

DotNetKicks.com wrote FsTest Updated with F# CTP
on 09-04-2008 11:57 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Reflective Perspective - Chris Alcock » The Morning Brew #173 wrote Reflective Perspective - Chris Alcock &raquo; The Morning Brew #173
on 09-05-2008 3:32 AM

Pingback from  Reflective Perspective - Chris Alcock  &raquo; The Morning Brew #173

Matthew Podwysocki's Blog wrote Object Oriented F# - More Extension Everything
on 09-12-2008 11:58 PM

In a previous post , I covered a few ways we can do extensions methods, properties, events and so on

Add a Comment

(required)  
(optional)
(required)  
Remember Me?