Showing posts with label training. Show all posts
Showing posts with label training. Show all posts

Tuesday, May 8, 2012

Testing the Untestable with VS2012 Fakes

One of the new features included with Visual Studio 2012 is the Fakes Framework which offers the ability to detour code at runtime and isolate functionality for true unit testing, regardless of whether the code was written with testing in mind.

I began speaking on Fakes back when it was a beta product from Microsoft Research called Moles. While the core functionality remains the same, Microsoft has streamlined the implementation and now calls the detour mechanism a shim rather than a mole.

If you have attended this or another of my talks at a user group or conference, please take a moment to share your feedback on SpeakerRate.

The PowerPoint is available on SlideShare and below are links to the code demonstrated in the presentation.

Demos
Y2K Checker (simple introduction)
DateTime Audit (avoiding non-deterministic tests)
File Reader (shimming file system access)
Repository (stubbing interfaces)

Resources
Visual Studio 2011
Fakes MSDN Documentation

Thursday, February 9, 2012

Microsoft PEX and Moles

Microsoft Research is currently beta testing a couple new frameworks that can make unit testing your code a breeze. Pex is a testing tool that analyzes code and generates unit tests. Moles is a framework that isolates code with dependencies on other application layers or frameworks. With just a few mouse clicks, you can generate suites of tests against code that previously may have been difficult or impossible to test.

Tonight I'll be giving a presentation on these technologies at the Nashville .NET User Group. For anyone who can't make it you can watch and discuss it in my Google Hangout. I'm hoping to post a video of the presentation to this blog within the next couple weeks. I'll also be giving a similar presentation and Code PaLOUsa on March 17th. Below are links to the demo solutions and Prezi used in the presentation.

Presentation on Prezi
Using Moles to Mock DateTime (Y2KBug.zip)
Using Moles to Stub Interfaces (MolesDemo.zip)
Using PEX to Generate Parameterized Unit Tests (PEXDemo.zip, PEXDemo-Result.zip)

Tuesday, November 8, 2011

Senior Developer Training on a Budget

So you've been in the business for over ten years and the technologies continue to change. Now everyone is talking about HTML5 and JavaScript isn't just a way to validate data or show dialog boxes. You're expected to use CSS to style your website instead of those trusty tables and this stuff is complicated. You could probably go to a local user group meeting or a conference to see a one hour presentation on the topic, but lets face it, you're not going to become a web ninja in an hour. What you need is a college level class that will take you from intro to advanced.
I'm sure I'm not the only one who's felt this way. Software developers have to be self taught, to some extent, but many things can only be learned through experience or taught by someone who has that experience. This got me thinking that maybe we need an opportunity for continued education that's more affordable than auditing a college class and taught by someone who actually does it for a living.

We're still working on sponsorship to pay for the laptops, lining up professors and scheduling the facility, but if all goes we may be holding the first classes in January 2012. What topics/technologies would you like to attend?