Skip to content

testing

These are the stories that have been posted to the testing category.

F# for Testing and Analysis at Code Camp 11 New England


Published to Rick Minerich's Development Wonderland by Richard Minerich March 26, 2009 20:18

At this Saturday’s Code Camp I’ll be giving a brand new presentation on using F#.  The goal of this presentation is to have those attending leave with an idea of what F# can help them achieve today as well as instill a desire to know more.  This post contains my presentation materials as well as links to additional information on the topics covered.

(Slide and code links will be updated soon.)

 

Presentation Details

F# for Testing and Analytics will be held in the TBC (Technical Briefing Center) at 10:30am.

New England Code Camp 11 Information
Download Presentation Slides
Download Real World Example Code Sample

I’ve been thinking quite a lot lately on the best way to get developers excited about F#.  By focusing less on the language’s details and more on what the language can help achieve I hope to impress upon those attending why F# is worth the effort.  The preliminary structure of the talk is as follows::

  • Introduction
    • Announcing the New England F# User Group 
  • Why F#?
    • Time Savings
    • Readability
    • Code Exploration
    • Robust Software
    • Visual Analytics
  • F# Testing Toolbox
    • xUnit.NET
    • TestDriven.NET and NCover
    • NaturalSpec
    • FsCheck
    • FsStory
  • A Real World Example
    • Exploring the Problem Space
    • Collect, Analyze, Report
    • Visualizing Data

Presentation Influences
John Hughes’s Paper: Why Functional Programming Matters
John Hughes’s Talk: FP – A Secret Weapon for Software Testing
Matthew Podwysocki’s 7 Part Series: Functional Programming Unit Testing

 

Announcing the New England F# User Group 

I’m proud to announce that we will be holding our first New England F# User Group meeting on Monday April 6th, from 6:30pm to 8:30pm.  It will be held at the aptly named Microsoft NERD center.  I hope to see you there.

Visit the F# User Group Homepage for more information.

 

xUnit.NET

“About a year ago it became clear to myself and Brad Wilson that there were some very clear patterns of success (and failure) with the tools we were using for writing tests. Rather than repeating guidance about "do X" or "don't do Y", it seemed like it was the right time to reconsider the framework itself and see if we could codify some of those rules.”

xUnit.NET Homepage

Learn More about xUnit.NET
Matthew Podwysocki’s The Unit Testing Story in F# Revisited
Jim Burger’s Unit testing in F# with xUnit.NET
Harry Pierson’s Practical F# Parsing: Unit Testing

 

TestDriven.NET and NCover

“TestDriven.NET is a zero friction unit testing add-in for Microsoft Visual Studio .NET. The current release of TestDriven.NET supports multiple unit testing frameworks including NUnit, MbUnit and MS Team System and is fully compatible with all versions of the .NET Framework.”

TestDriven.NET Homepage (Includes a free version of NCover)
NCover Homepage

Learn More about TestDriven.NET and NCover
Matthew Podwysocki’s F# + TestDriven.NET + xUnit = Win 
Matthew Podwysocki’s FP Unit Testing Part 4 – Code Coverage

 

NaturalSpec

“The idea of NaturalSpec is to give domain experts the possibility to express their scenarios directly in compilable Unit Test scenarios by using a Domain-specific language (DSL) for Unit Tests. NaturalSpec is completely written in F# – but you don’t have to learn F# to use it. You don’t even have to learn programming at all.”

NaturalSpec Homepage

Learn More about NaturalSpec
Steffen Forkmann’s “Getting Started” with NaturalSpec
Steffen Forkmann’s Testing QuickSort with NaturalSpec
Steffen Forkmann’s Using NaturalSpec to create a spec for C# projects

 

FsCheck

“FsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases.”

FsCheck Homepage

Learn More about FsCheck
Claudio Cherubino’s Random testing in F# with FsCheck
Matthew Podwysocki’s FP Unit Testing Part 2 – QuickCheck and FsCheck
Kurt Schelfthout’s FsChecking dnAnalytics Part 1, Part 2 and Part 3

 

FsStory

“FsStory is a library for writing executable user stories in F#. FsStory enables the developer to write user story scenarios (in Given/When/Then form) in F# code.”

FsStory Homepage

Learn More about FsStory
Gustaf Nilsson Kotte’s Fluent language in FsStory
Gustaf Nilsson Kotte’s FsStory, executable stories in F#

F# for Testing and Analysis at Code Camp 11 New England


Published to Rick Minerich's Development Wonderland by Richard Minerich March 27, 2009 22:36

At this Saturday’s Code Camp I’ll be giving a brand new presentation on using F#.  The goal of this presentation is to have those attending leave with an idea of what F# can help them achieve today as well as instill a desire to know more.  This post contains my presentation materials as well as links to additional information on the topics covered.

 

Presentation Details

F# for Testing and Analytics will be held in the TBC (Technical Briefing Center) at 10:30am.

New England Code Camp 11 Information

Download Presentation Slides: F# for Testing and Analysis.pdf

I’ve been thinking quite a lot lately on the best way to get developers excited about F#.  By focusing less on the language’s details and more on what the language can help achieve I hope to impress upon those attending why F# is worth the effort.  The preliminary structure of the talk is as follows::

  • Introduction
    • Announcing the New England F# User Group 
  • Why F#?
    • Time Savings
    • Readability
    • Code Exploration
    • Robust Software
    • Power
  • F# Testing Toolbox
    • xUnit.NET
    • TestDriven.NET and NCover
    • NaturalSpec
    • FsCheck
  • A Real World Example
    • Exploring the Problem Space
    • Collect, Analyze, Report
    • Visualizing Data

Presentation Influences
John Hughes’s Paper: Why Functional Programming Matters
John Hughes’s Talk: FP – A Secret Weapon for Software Testing
Matthew Podwysocki’s 7 Part Series: Functional Programming Unit Testing

 

Announcing the New England F# User Group 

I’m proud to announce that we will be holding our first New England F# User Group meeting on Monday April 6th, from 6:30pm to 8:30pm.  It will be held at the aptly named Microsoft NERD center.  I hope to see you there.

Visit the F# User Group Homepage for more information.

 

xUnit.NET

“About a year ago it became clear to myself and Brad Wilson that there were some very clear patterns of success (and failure) with the tools we were using for writing tests. Rather than repeating guidance about "do X" or "don't do Y", it seemed like it was the right time to reconsider the framework itself and see if we could codify some of those rules.”

xUnit.NET Homepage

Learn More about xUnit.NET
Matthew Podwysocki’s The Unit Testing Story in F# Revisited
Jim Burger’s Unit testing in F# with xUnit.NET
Harry Pierson’s Practical F# Parsing: Unit Testing

 

TestDriven.NET and NCover

“TestDriven.NET is a zero friction unit testing add-in for Microsoft Visual Studio .NET. The current release of TestDriven.NET supports multiple unit testing frameworks including NUnit, MbUnit and MS Team System and is fully compatible with all versions of the .NET Framework.”

TestDriven.NET Homepage (Includes a free version of NCover)
NCover Homepage

Learn More about TestDriven.NET and NCover
Matthew Podwysocki’s F# + TestDriven.NET + xUnit = Win 
Matthew Podwysocki’s FP Unit Testing Part 4 – Code Coverage

 

NaturalSpec

“The idea of NaturalSpec is to give domain experts the possibility to express their scenarios directly in compilable Unit Test scenarios by using a Domain-specific language (DSL) for Unit Tests. NaturalSpec is completely written in F# – but you don’t have to learn F# to use it. You don’t even have to learn programming at all.”

NaturalSpec Homepage

Learn More about NaturalSpec
Steffen Forkmann’s “Getting Started” with NaturalSpec
Steffen Forkmann’s Testing QuickSort with NaturalSpec
Steffen Forkmann’s Using NaturalSpec to create a spec for C# projects

 

FsCheck

“FsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases.”

FsCheck Homepage

Learn More about FsCheck
Claudio Cherubino’s Random testing in F# with FsCheck
Matthew Podwysocki’s FP Unit Testing Part 2 – QuickCheck and FsCheck
Kurt Schelfthout’s FsChecking dnAnalytics Part 1, Part 2 and Part 3

 

FsStory

“FsStory is a library for writing executable user stories in F#. FsStory enables the developer to write user story scenarios (in Given/When/Then form) in F# code.”

FsStory Homepage

Learn More about FsStory
Gustaf Nilsson Kotte’s Fluent language in FsStory
Gustaf Nilsson Kotte’s FsStory, executable stories in F#

As a FP Ambassador - F# for Testing and Analysis at Code Camp 11


Published to Rick Minerich's Development Wonderland by Richard Minerich March 19, 2009 16:00

Over the last six months I’ve given variations on the same F# presentation on six separate occasions.  Each time I’ve gotten a similar response: enthusiasm from a small percentage of the audience and glazed-over stares from the majority.  In retrospect it seems obvious that I’ve been missing one of the major tenets of making great presentations, know thy audience.  It’s time for a new approach.

 

Information Overload

When thinking about how to get people excited about F# I immediately jumped to the learning format that I found the most exciting.  There was no time in my life when I was as overwhelmed by information like I was working on my Computer Science degree at UMass Amherst and I loved every minute of it.  When I started out, it seemed that using a university lecture as a model was the best possible format for sharing this kind of information.

I’ve since come to realize that this style of soaking the audience with “a fire hose of information” is a poor format for Code Camps.  While using this technique, I could see people turning off one by one as they became overloaded with information.  This is not in the spirit of code camp which aims to be a much more laid back kind of experience. 

 

As a FP Ambassador

Let’s invert perspectives and think about what an audience member would want.  When a person comes to a Code Camp presentation, it’s likely to be one of their first times being exposed to the topic being presented.  They don’t want to be taught as if they were in a classroom.  Instead, they want to be exposed to new and exciting information.  If their interest is piqued, they will seek details later.

So, instead of focusing on the details of F#, this new presentation will be built around the goal of instilling five key ideas to the audience:

It must be understood that almost every Code Camp attendee will have had little or no exposure to functional programming.  To many attendees, to be presenting on F# is to be an ambassador from the strange and nebulous functional programming world.  Instead of building walls of information, the goal should be to instead focus on connecting with the audience on the benefits of functional programming.

 

Planned Talk Structure

  • Depending on an Audience Poll, Broad Concepts
  • Testing with F#
    • nUnit Examples (as a baseline)
    • xUnit Examples
    • FsStory Examples
  • Analysis with F# (A Real Example From Atalasoft)
    • Using The F# Interactive Window To Build Tests
    • Data Collection
    • Visualizing Data
  • Conclusion
    • Why F#?

More details will follow soon.

Discoveries This Week 02/13/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich February 13, 2009 15:43

A wide range of subjects this week including testing, concurrent performance, exception handing and data structures.

 

Software – FsStory, a library for writing executable user stories in F#

I feel that F#, with it’s concise syntax, is an ideal framework for writing tests.  Combined with FsStory F# is made much more powerful in this regard as it becomes possible to write user case tests and have them read very much like simple English.   F# has a huge advantage here over C# as it has much less syntactic cruft and so much less for your brain to process while reading.   For example:

  1: [<Fact>]
  2: let MoveTurtleToPosition() = 
  3:        given ATurtle
  4:     |> andGiven IsRotated90DegreesToTheRight
  5:     |> whens (TurtleWalksSteps 9)
  6:     |> thens (TurtleIsLocatedAt (0,9))   
  7:     |> endStory

It’s obvious exactly what this is testing and how.  Yet, it takes very little time to read.  Very impressive.

 

Blog –Jan Varwig’s F# Observations

While this post is rather old, I was very excited by Jan’s analysis of an article on comparing C# and F# using the distributed .NET computing framework Alchemi

Optimizing this application showed that F# would finish in 1.5 seconds while C# would not complete any faster than 2.6 seconds.

It’s important to note that these results are a year old now and that with newer F# optimization the results might be even better.

The other interesting thing in this post is the discussion of the cost of heavyweight threads on the CLR.  Which is directly related to our next discovery:

 

Blog – Daniel Moth’s New and Improved CLR 4 Thread Pool Engine

A first glimpse of that is in store for us in the next iterating of the Thread Pool.  Not surprisingly, the optimizations seem to focus on sharing work across multiple threads. 

With F#’s thread-friendly nature and new the optimized thread pool, I'm very excited to see how .NET compares to other grid computing platforms after it’s 4.0 release.

 

Blog – Arthur Herczeg’s F# Exceptions

An informational post on managing and throwing both F# native and general .NET exceptions in F#.  Included are examples of imperative style try, catch and try, finally patterns.

 

Blog – Karl Krukow’s Understanding Clojure’s PersistentVector

Rich Hickey, the father of the Clojure language, has gone out of his way to optimize Clojure’s structures for data sharing with immutability.  I was very impressed with Clojure when, back last march, Rich Hickey came to Northampton and presented it in a talk.  While, Clojure runs on the JVM and so comes along with all of the baggage that it entails, it’s a fantastic language and people in the java community are flocking to it.

I would love to see some of these data structures ported to the .NET framework so that F# could take advantage of them.  As far as I am currently aware, F# data structures are instead implemented via binary trees and so are much less efficient in terms of the amount of data shared.

Discoveries This Week 02/13/2009


Published to Rick Minerich's Development Wonderland by Richard Minerich February 13, 2009 15:43

A wide range of subjects this week including testing, concurrent performance, exception handing and data structures.

 

Software – FsStory, a library for writing executable user stories in F#

I feel that F#, with it’s concise syntax, is an ideal framework for writing tests.  Combined with FsStory F# is made much more powerful in this regard as it becomes possible to write user case tests and have them read very much like simple English.   F# has a huge advantage here over C# as it has much less syntactic cruft and so much less for your brain to process while reading.   For example:

  1: [<Fact>]
  2: let MoveTurtleToPosition() = 
  3:        given ATurtle
  4:     |> andGiven IsRotated90DegreesToTheRight
  5:     |> whens (TurtleWalksSteps 9)
  6:     |> thens (TurtleIsLocatedAt (0,9))   
  7:     |> endStory

It’s obvious exactly what this is testing and how.  Yet, it takes very little time to read.  Very impressive.

 

Blog –Jan Varwig’s F# Observations

While this post is rather old, I was very excited by Jan’s analysis of an article on comparing C# and F# using the distributed .NET computing framework Alchemi

Optimizing this application showed that F# would finish in 1.5 seconds while C# would not complete any faster than 2.6 seconds.

It’s important to note that these results are a year old now and that with newer F# optimization the results might be even better.

The other interesting thing in this post is the discussion of the cost of heavyweight threads on the CLR.  Which is directly related to our next discovery:

 

Blog – Daniel Moth’s New and Improved CLR 4 Thread Pool Engine

A first glimpse of that is in store for us in the next iterating of the Thread Pool.  Not surprisingly, the optimizations seem to focus on sharing work across multiple threads. 

With F#’s thread-friendly nature and new the optimized thread pool, I'm very excited to see how .NET compares to other grid computing platforms after it’s 4.0 release.

 

Blog – Arthur Herczeg’s F# Exceptions

An informational post on managing and throwing both F# native and general .NET exceptions in F#.  Included are examples of imperative style try, catch and try, finally patterns.

 

Blog – Karl Krukow’s Understanding Clojure’s PersistentVector

Rich Hickey, the father of the Clojure language, has gone out of his way to optimize Clojure’s structures for data sharing with immutability.  I was very impressed with Clojure when, back last march, Rich Hickey came to Northampton and presented it in a talk.  While, Clojure runs on the JVM and so comes along with all of the baggage that it entails, it’s a fantastic language and people in the java community are flocking to it.

I would love to see some of these data structures ported to the .NET framework so that F# could take advantage of them.  As far as I am currently aware, F# data structures are instead implemented via binary trees and so are much less efficient in terms of the amount of data shared.

As a FP Ambassador - F# for Testing and Analysis at Code Camp 11


Published to Rick Minerich's Development Wonderland by Richard Minerich March 19, 2009 16:00

Over the last six months I’ve given variations on the same F# presentation on six separate occasions.  Each time I’ve gotten a similar response: enthusiasm from a small percentage of the audience and glazed-over stares from the majority.  In retrospect it seems obvious that I’ve been missing one of the major tenets of making great presentations, know thy audience.  It’s time for a new approach.

 

Information Overload

When thinking about how to get people excited about F# I immediately jumped to the learning format that I found the most exciting.  There was no time in my life when I was as overwhelmed by information like I was working on my Computer Science degree at UMass Amherst and I loved every minute of it.  When I started out, it seemed that using a university lecture as a model was the best possible format for sharing this kind of information.

I’ve since come to realize that this style of soaking the audience with “a fire hose of information” is a poor format for Code Camps.  While using this technique, I could see people turning off one by one as they became overloaded with information.  This is not in the spirit of code camp which aims to be a much more laid back kind of experience. 

 

As a FP Ambassador

Let’s invert perspectives and think about what an audience member would want.  When a person comes to a Code Camp presentation, it’s likely to be one of their first times being exposed to the topic being presented.  They don’t want to be taught as if they were in a classroom.  Instead, they want to be exposed to new and exciting information.  If their interest is piqued, they will seek details later.

So, instead of focusing on the details of F#, this new presentation will be built around the goal of instilling five key ideas to the audience:

It must be understood that almost every Code Camp attendee will have had little or no exposure to functional programming.  To many attendees, to be presenting on F# is to be an ambassador from the strange and nebulous functional programming world.  Instead of building walls of information, the goal should be to instead focus on connecting with the audience on the benefits of functional programming.

 

Planned Talk Structure

  • Depending on an Audience Poll, Broad Concepts
  • Testing with F#
    • nUnit Examples (as a baseline)
    • xUnit Examples
    • FsStory Examples
  • Analysis with F# (A Real Example From Atalasoft)
    • Using The F# Interactive Window To Build Tests
    • Data Collection
    • Visualizing Data
  • Conclusion
    • Why F#?

More details will follow soon.

F# for Testing and Analysis at Code Camp 11 New England


Published to Rick Minerich's Development Wonderland by Richard Minerich March 27, 2009 22:36

At this Saturday’s Code Camp I’ll be giving a brand new presentation on using F#.  The goal of this presentation is to have those attending leave with an idea of what F# can help them achieve today as well as instill a desire to know more.  This post contains my presentation materials as well as links to additional information on the topics covered.

 

Presentation Details

F# for Testing and Analytics will be held in the TBC (Technical Briefing Center) at 10:30am.

New England Code Camp 11 Information

Download Presentation Slides: F# for Testing and Analysis.pdf

I’ve been thinking quite a lot lately on the best way to get developers excited about F#.  By focusing less on the language’s details and more on what the language can help achieve I hope to impress upon those attending why F# is worth the effort.  The preliminary structure of the talk is as follows::

  • Introduction
    • Announcing the New England F# User Group 
  • Why F#?
    • Time Savings
    • Readability
    • Code Exploration
    • Robust Software
    • Power
  • F# Testing Toolbox
    • xUnit.NET
    • TestDriven.NET and NCover
    • NaturalSpec
    • FsCheck
  • A Real World Example
    • Exploring the Problem Space
    • Collect, Analyze, Report
    • Visualizing Data

Presentation Influences
John Hughes’s Paper: Why Functional Programming Matters
John Hughes’s Talk: FP – A Secret Weapon for Software Testing
Matthew Podwysocki’s 7 Part Series: Functional Programming Unit Testing

 

Announcing the New England F# User Group 

I’m proud to announce that we will be holding our first New England F# User Group meeting on Monday April 6th, from 6:30pm to 8:30pm.  It will be held at the aptly named Microsoft NERD center.  I hope to see you there.

Visit the F# User Group Homepage for more information.

 

xUnit.NET

“About a year ago it became clear to myself and Brad Wilson that there were some very clear patterns of success (and failure) with the tools we were using for writing tests. Rather than repeating guidance about "do X" or "don't do Y", it seemed like it was the right time to reconsider the framework itself and see if we could codify some of those rules.”

xUnit.NET Homepage

Learn More about xUnit.NET
Matthew Podwysocki’s The Unit Testing Story in F# Revisited
Jim Burger’s Unit testing in F# with xUnit.NET
Harry Pierson’s Practical F# Parsing: Unit Testing

 

TestDriven.NET and NCover

“TestDriven.NET is a zero friction unit testing add-in for Microsoft Visual Studio .NET. The current release of TestDriven.NET supports multiple unit testing frameworks including NUnit, MbUnit and MS Team System and is fully compatible with all versions of the .NET Framework.”

TestDriven.NET Homepage (Includes a free version of NCover)
NCover Homepage

Learn More about TestDriven.NET and NCover
Matthew Podwysocki’s F# + TestDriven.NET + xUnit = Win 
Matthew Podwysocki’s FP Unit Testing Part 4 – Code Coverage

 

NaturalSpec

“The idea of NaturalSpec is to give domain experts the possibility to express their scenarios directly in compilable Unit Test scenarios by using a Domain-specific language (DSL) for Unit Tests. NaturalSpec is completely written in F# – but you don’t have to learn F# to use it. You don’t even have to learn programming at all.”

NaturalSpec Homepage

Learn More about NaturalSpec
Steffen Forkmann’s “Getting Started” with NaturalSpec
Steffen Forkmann’s Testing QuickSort with NaturalSpec
Steffen Forkmann’s Using NaturalSpec to create a spec for C# projects

 

FsCheck

“FsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases.”

FsCheck Homepage

Learn More about FsCheck
Claudio Cherubino’s Random testing in F# with FsCheck
Matthew Podwysocki’s FP Unit Testing Part 2 – QuickCheck and FsCheck
Kurt Schelfthout’s FsChecking dnAnalytics Part 1, Part 2 and Part 3

 

FsStory

“FsStory is a library for writing executable user stories in F#. FsStory enables the developer to write user story scenarios (in Given/When/Then form) in F# code.”

FsStory Homepage

Learn More about FsStory
Gustaf Nilsson Kotte’s Fluent language in FsStory
Gustaf Nilsson Kotte’s FsStory, executable stories in F#

Code Camp Hartford 2 Presentation – F# for Testing and Analytics (June 13th)


Published to Rick Minerich's Development Wonderland by Richard Minerich June 12, 2009 19:22

I will be speaking at tomorrow’s Code Camp Hartford 2 on the topic of using F# for the Testing and Analysis of existing code. This talk will be composed of much of the same material I used at Code Camp Waltham 11, although I will be preparing additional introductory material as many of my Waltham attendees had no prior exposure to F#. 

I hope the audience will find this new introduction short and sweet.  In this case my goal will not be to teach F# per se, instead I would like to impress upon the audience the power of using functional programming constructs.

 

Presentation Details

F# for Testing and Analytics will be held in Room E-Echo at 10:30am.

As I often like to make changes up to the last minute, this post will be updated with my slides after the presentation. Slides are now available here.

 

The Plan

For more information, see my post on the Code Camp Waltham 11 Presentation.  I wrote quite extensively in that post on most of the things I will be discussing in this talk.