Silverlight Xunit.net Test Runner

Link. November 13, 2007. Comments [0]. Posted in: .NET

A couple of people have asked if I could share the code for my experimental Xunit.net silverlight v1.1 test runner. Actually, the stuff I did was fairly simple and not very polished, but I'll should get someone else started on building a real runner out of it :-)

You can download the code here.

Some things to keep in mind:

  1. The zip doesn't contain all the code. Only the silverlight specific parts:
    • The sample test HTML page and its JS scripts
    • The silverlight control XAML
    • The TestRunnerView, a Canvas derived class that implements the actual silverlight control
  2. This means you still need to go and grab the XUnit distribution and get it to compile with Silverlight on your own. Here are some tips, though:
    • If you're using VS2005 to build it, you need to build against the silverlight assemblies. Here's a good starting point.
    • On the Xunit.net solution, I got rid of everything except the core xunit.dll assembly code. It's easier to get started that way.
    • Get rid of the xunit\Sdk\XmlVisitor.cs file, as it uses XmlDocument and friends and won't compile on silverlight. You don't need it right away, but I'm sure someone will rewrite it to use an XmlReader/Writer instead.
    • There are other changes here and there you need to make to get the code to compile, just follow the compiler errors :-).

Enjoy!



Comments are closed.

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Categories

Statistics

Total Posts: 1035
This Year: 105
This Month: 4
This Week: 2
Comments: 802

Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.1.8139.823

Sign In