November 2004 - Posts
Last post of November, the most posts this month than ever before :) Interesting article on creating custom attributes
I located on the MbUnit Wicki
. I am thinking about creating a SDC Build tools task for MbUnit, will make for an interesting start to December.
Fellow UK'er and testdriven.net main man Jamie Cansdale has launched a new website today
for the testdriven.net tools.
Peli also posted on this
. Comments are interesting (clues on that in Pelis blog header), what Peli is up to he is yet to announce, very exciting times.
Looking for a way I could use the SDC Build tools in CruiseControl I considered using the execute task but I wanted a nice clean way of running SDC Build tools like NAnt. This great article put me on my way and a few hours this morning gives me.
A few things I could add but the bare bones of passing a buildfile to SDC Build tools and detecting if the build failed or not within SDC Build tools works a treat. I coded this in VB.NET, a few things to note from the various examples if your using VB.NET.
Your required to implement the IBuilder interface.
Public Sub Run(ByVal result As IIntegrationResult) Implements IBuilder.Run
and don't forget Public Function ShouldRun(ByVal result As IntegrationResult) As Boolean Return result.Working & result.HasModifications End Function
I have started wondering about how easy it is to create your own assertions using NUnit and MbUnit. While looking around I found this O'Reilly book on NUni
t. The TOC looks good
with coverage on Jamies NUnitAddIn as well as subjects such as Mock objects. I do wonder if a more complete book on unit testing is required, something that will cover the basics of unit testing against say the V model or in agile approaches, as well as cover subjects such as unit testing applied in NCover, NAnt and CC.net etc. It would also be nice to see the subject be approached with all of the various unit testing tools, CSUnit, NUnit, MbUnit etc (in this way features that are shared by the tools as features unqiue to the tools can be covered). If anyone has such a project on the boil or is thinking in these terms give me a shout would love to help on writing or reviewing. Update
: Lookie what I found
. No CSUnit or MbUnit coverage, nor unit testing theory what I can tell though and this is what I would be seeking.
I get the feeling that CVS while being a grand citzen of version control systems is becoming old, many seem to see subversion as its replacement. I noticed on Lamda a post on a version control system called Darc
s, based on a
theory of patches with roots in quantum mechanics
Robin has some info on what the folks at Xamlon are cooking up
and includes a survey with the promise of rich rewards :) I was interested to learn that they are working on compiling XAML to SWF and windows forms. I have been saying for a long time that RIA markups need to think along these lines, great to see it happening.
The build tool is likely to be NAnt with SDC build tools or devenv where the solution task fails me. The exact details I have yet to figure out (informing NAnt that a build has failed from these may get tricky). I have focused back on MbUnit and CruiseControl for the time being.
Johnathans XSL transform for CC works a treat but CC was informing me no tests had run. After some head scratching I noticed that CC has two transforms, unittests.xls and test.xls. The tests.xls file is the file that Johnathan had done a port of. but the unittest.xls file was not ready for MbUnit. A quick hack and the file was doing a rough report, the next step is to neaten the transform up (I have also requested this file on the MbUnit list but if I get there first I will send it on). To get this to work I recommend that you change MbUnit to use the report-filename-format attribute so it uses a fixed file name and the report-output-directory to output the file to a given directory. You can then change your projects merge section (in your CC config file) to point at the same directory as report-output-directory.
One thing I have noticed about the MbUnit task is that it does'nt fail a NAnt build if one of the tests fail, this means that CC reports a successful build even through the MbUnit tests fail. I have raised a defect for this. The stylesheet for the unit test results is making what tests.xls creates look a little wonky, I will look at that at some point.
Update: Suggested fix for tests.xls file is here.
Update2: I now have a hacked up version of unitests.xls that will work with MbUnit output. Still a few details to work out but the ability to no errors & errors is working. If anyone else is trying this and would like me to send them the file let me know.
Spent a bit of time tonight creating some sample ASP.NET projects to see if I could re-create todays earlier NAnt issues and try out building with the SDC Tools. I could'nt re-create the problems which is frustrating, the solution task handles just about everything other than large ASP.NET projects (MS CMS in ASP.NET pages also seems to cause it problems). I also tried building the samples with the SDC Build tools and all went well. To be sure I need to try out the SDC Build tools on the projects that were struggling with NAnt, hopefully this will work.
A few SDC tools posts to note (thanks to Howard for leaving these in the comments)
Same issues as NAnt but this time with no error message at all and all builds are failing. Not sure if its because I am compiling to 1.0 but as with NAnt everything other than ASP.NET projects are working. Back to the drawing board.
Saw a tip on using devenv, using this I was able to debug my SDC scripts and now only one is failing. Not sure why but from the command line it works fine as long as you use "" to embrace the solution location and filename. I could use devenv in place of the solution task in NAnt where it fails to work. I could also use SDC in place of NAnt and run devenv direct from cruisecontrol, however I am unsure on if it can optionally compile to 1.0 or 1.1. This option would also mean running MbUnit from the command line in CruiseControl as well.
More Posts Next page »