www.codinghillbilly.com   kyle.baley.org  Subscribe / Contact
 
 
 
 
LATEST POSTS
Wednesday, January 09, 2008

Shortly before I was given the free time I so dearly craved in such a Twilight Zone-esque manner, we had implemented Ryan LaNeve's fancy XSL technique for reporting BDD-style specifications from CC.NET. It gives some neat little feedback for your tests and even works reasonably well for more traditionally-named tests. And the XSL itself is very neatly laid out and easy to follow.

A couple of notes on it that may not be obvious from the post:

  • The XSL stylesheet adds a "success" or "failure" class to the test names. So if you load it up and don't immediately see green test names, add CSS rules for those two class names. And try to be more creative than: color:red; font-weight: bold. As a general rule, you can never use too much cyan.
  • By default, the XSL will strip out spaces from the test as well as any leading .BaseSetUp. and trailing .TearDown text from the test names. This works if your setup and teardown methods are so named. If not, you'll need to make appropriate changes.

A note about the second point: XSL is case-sensitive. So if you tell the stylesheet to strip TearDown, that's all it will strip. Any teardown methods named Teardown or teardown will still appear. And while XSL 2.0 does offer the ability to do case-insensitive search and replace, to the best of my knowledge, neither Firefox nor IE support it. So you are stuck either with funky templates using translate, or, and this probably more practical, adding checks for all variations of TearDown and SetUp used in your codebase.

Or you could just be consistent with your naming standards.

Kyle the Optional

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright © 2010 Kyle Baley. All rights reserved.
 
CATEGORIES
.NET General (18) alt.net (4) altnetconf (9) ASP.NET AJAX (40) ASP.NET MVC (29) Bahamas (1) Bahanet (9) BDD (1) Brownfield (21) Career (10) Castle (1) Code coverage (1) Code review (2) Coding Style (6) Communication (1) Community (18) Conscientious Coding (35) Continuous Integration (11) dasBlog (12) Development (16) DevTeach (4) Domain (2) Environment (4) Estimating (1) Featured (14) Flamingo (10) Games (1) Google App Engine (3) GWT (9) Hardware (6) Java (2) Javascript (7) Linq (2) Livelink (6) Lucene.NET (2) MbUnit (1) Metrics (2) Miscellaneous (25) Mocking (4) NAnt (4) NHibernate (12) NInject (1) Office (3) Office Development (6) Open Rasta (1) Patterns (6) Presenting (14) Professional Development (15) Refactoring (10) ReSharper (11) REST (3) S#arp Architecture (5) Security (3) Software (11) Sundry (19) TDD (19) Tools (22) User Interface (6) Utilities (9) Visual Studio (8) VSTO (1) Web development (12) Windows (3) Working Remotely (17) Workplace (3) Writing (6)
 
LATEST POSTS
 
POPULAR POSTS
 
 
ARCHIVE