Sunday, July 22, 2012

Tooling stack of testing Asp.MVC Views

“Craftsmen know their tools”

At last weeks AspConfJim Counts did a session on Testing MVC Views with ApprovalTests.
While I am always happy to see more ApprovalTesting in the world, I was also impressed with the full tooling stack Jim used throughout the presentation.

Here’s the List
CassiniDev   Inline webserver
NCrunch Continuous Test Runner
GitHub for Windows Source Control
CruiseControl.Net Continuous Integration
TortoiseDiff Diff Viewer (part of TortoiseSVN)
Code Rush Productivity Enhancement for Visual Studio
NuGet .Net Package Manager

It was great to see this level of professionalism in a demo session; an area usually reserved for cowboy programming of hello world demos. Don’t get me wrong, Jim still does a simple “Hello World” type demo, but he applies all the rigor and professionalism I would want in a real project to that example.

Nicely done Jim, you’ve inspired me to raise my game, and hopefully others as well.

Saturday, July 14, 2012

What’s new in Java ApprovalTests v.011

Today I Released ApprovalTests for Java v.011. Here's what new:

Approvals.Approve()  => Approvals.Verify()

I finally got around to fixing an early mistake in my naming convention.  Approvals.Approve() is now deprecated, and Approvals.Verify() is the new way to verify your result.

Mac OsX Diff Reporter Support

To help support my friends on the Mac Side, I have added a whole bunch of reporters for them. Including:
  • DiffMergeReporter
  • KaleidoscopeDiffReporter
  • TkDiffReporter
What do you need to do to use these? Nothing, the regular DiffReporter will cascade appropriately to find the right one on you machine.

Machine Dependent Testing

If you have multiple environments, which render things differently,  you can now use the line
 NamerFactory.asMachineSpecificTest(new OsEnvironmentLabeller());


Which will add the machine OS as part of the approved & received file name. 

For Example:  ClassName.MethodName.Mac_OS_X.approved.txt

This will allow you different Golden Masters for different Environments.