Dennis van der Stelt

The only way to win is to learn faster than anyone else

Community

Email Notifications

News

  • Addicted to Refactor! Pro

I read...

I Use...

Tags

Recent Posts

Archives

Blog Subscription Form

  • Email Notifications
    Go

xlUnit - Unit testing for Excel

I've been busy in Microsoft Excel for a few weeks now. It's just a minor application I have to finish and once that's done I can start over again, but then I'll have to do an application that's a lot like this one, in C#. Some architectural challenges are in the next application, but I hope they make up for the lack in this one. Man, is Excel boring!

Also the fact that I could not practice Test Driven Development has again made clear you think about your objects and your design much better with TDD, then without.

So as I was bored doing this VBA code to fill up some crazy cells, ranges, worksheets and what more, I decided to create xlUnit. xlUnit is just some more VBA code, but this time I had fun writing it. It's nothing groundbreaking, I bet even my mom could come up with this. But the fact that I can practice TDD and see if everything's working with the click of a button, has made development even in Excel a little bit more fun.

I'll go write some more smart VBA code now! :-)

Comments

P.J. van de Sande said:

The screenshot created a big smille on my face!

I think this is the first Unit Test in Excel :)
# September 1, 2005 6:29 AM

Dennis van der Stelt said:

You're not blind, it was a really simple solution completely fixed for my project. So not worth sharing.

# November 2, 2006 11:13 PM

Marko said:

The idea sounds great! Is it possible to share your xlUnit with the rest of us?
# November 4, 2006 7:29 AM

Dennis van der Stelt said:

Hmmm, seems I've deleted a comment by accident, the one before the "You're not blind" one.

Anyway, it wasn't a framework, just some methods. A main method (behind the start button in the screenshot) just executed all other methods. There was (for example) an Assert.Equals method that compared two parameters to see if the result was expected, including a parameter to let the assert method know what row it should show a red or green light. All functions in the screenshot were on a fixed location, so that was the row I had to give the Assert.Equals function.

Just plain and simple. Like KIS (Keep It Simple). :) But I had fun doing it.

# November 5, 2006 11:17 PM

Klaus said:

I've found two excelsheets, where you can test your units.

sourceforge.net/.../vbaunit

www.richardjones.info/.../downloads.html

Bye

# September 13, 2007 1:14 PM

Loosely Coupled Human Code Factory - A.K.A. Mercenary Engineer said:

Nope, gotta do it. I went around and hit Google for some links. At this point the key links...

# June 13, 2008 6:08 PM

Nick said:

Thanks Klaus vbaunit is good

sourceforge.net/.../vbaunit

# August 2, 2008 3:54 AM

Velma22Lara said:

This is well known that cash can make us disembarrass. But what to do if someone has no money? The one way is to get the <a href="http://bestfinance-blog.com">loan</a> and term loan.

# September 3, 2011 2:15 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 7 and 6 and type the answer here: