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! 🙂

You may also like...

7 Responses

  1. The screenshot created a big smille on my face!

    I think this is the first Unit Test in Excel 🙂

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

  3. Marko says:

    The idea sounds great! Is it possible to share your xlUnit with the rest of us?

  4. 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.

  5. Nick says:

    Thanks Klaus vbaunit is good

    sourceforge.net/…/vbaunit

  6. Velma22Lara says:

    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 loan and term loan.

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.