Unit Testing Excel!!??!??! Are You Kidding!

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

These later two items seem to cover a lot of ground for VBA Unit Testing of Excel.  There is however a MAJOR problem.  It is unit testing inside of Excel.  This I don’t really need, what I need is the ability or a framework to create programmatic (from the VB or C# Code) unit tests of work being done in Excel.  So far I’m not sure how this could or should be done.  I am however, coming to some conclusions and will be posting those soon.  Anyone else out there in the blogosphere that has any ideas, let me know (plz).

Technorati Tags: Excel,Unit Test,VBA

del.icio.us Tags: Excel,Unit Test,VBA

from tag Excel

(more..)

Taking Responsibility for Broken Builds :: Tip O' The Day

Another quickie tip o’ the day.  When the build is broken in TeamCity, a good habit to gain is to “Take Responsibility” for the broken build.  Whoever broke it, or more specifically whoever is fixing it, should click on “Take Responsibility” so that others know that it is being fixed.

This way no one ever has to go run around asking who is working on the build.

Then once the build succeeds, one can run around and celebrate like a mad hatter.

kick it on DotNetKicks.com

Technorati Tags: TeamCity,Build Notification,Responsibility

del.icio.us Tags: TeamCity,Build Notification,Responsibility

ReSharper and NUnit Integration :: Tip O' The Day

Just a quick one over of the awesomeness of ReSharper and NUnit.  In both VB and C# one can execute a test, or tests within a class by a mere click of the mouse!  No need to right click and run test, or open up additional windows or a test runner.  Just click.

In VB the icons look like the ones below…

and in C# they look like the image below…

For either of the icons, for the method or class, just click it and a dialog will appear.

Click on Run and you’ll get the ReSharper Unit Test Session UI.

kick it on DotNetKicks.com

Technorati Tags: ReSharper,NUnit,Integration,Test,Unit

del.icio.us Tags: ReSharper,NUnit,Integration,Test,Unit

TeamCity Build Notification Tools

For the .NETters that use TeamCity there are two primary notification tools.  The first is a tray icon tool and the second is a VS.NET plug-in.

Both of these notification tools can be found on the TeamCity Build Server Site.  Go to the user settings section and download the notification tools.  I’m just going to go over the tray icon notification tool right now and maybe the VS.NET notification tool add in later.

For the tray icon tool go through the installation steps.  I left the default installation path as is, and suggest that you do the same.  When it is complete I let the installation start the tray icon notification tool.  When it pops up it will prompt you for your user name and password.

If you haven’t entered a URI for the Server you want to be notified about, it will prompt you for the specific URI.

Double click the tray icon and the screen below should load in your default browser.

Click on add a rule.  The “Add New Rule” screen will come up.  I usually select to “Watch builds from selected build configurations:” and select the specific builds I want to watch.  Under the “Send notification when:” section I set things up so that I’ll know when the build fails and is successful – cuz I dig success and want to know about it too – and I set things up so that it really only triggers if the build succeeds after a failure or it fails after a success.  Really only changes in the status are what really needs to be known.

I also put the responsibility changes check box to true since I administer the build server at my current position I like to know if or when people are going to work on a broken build.  Some times the build server is actually the problem and particular pieces of the build are broken because it doesn’t have the correct GAC configuration or some other element has changed.  These things need resolved by the administrator so I stay prepared by watching the changes of responsibility.

Ahhh yeah, success!

kick it on DotNetKicks.com

Technorati Tags: TeamCity,Build Notification,JetBrains,ReSharper

del.icio.us Tags: TeamCity,Build Notification,JetBrains,ReSharper

Team City Continuous Integration Build Server and VS.NET VCS Integration

Starting a new project always requires a certain amount of setup, one of the primary goals of any development group these days should be continuous integration.  This is something that is not expensive or time consuming to setup.  Recently for a grand price of about zero dollars (except for my regular pay, so I suppose not truly zero dollars) I setup Team City, started a build process going, and got back to coding and research on next steps all within about 3-4 hours.  Mind you, two of those hours was stuck on a dumb problem because I “clicked” the wrong option in a drop down box.

NOTE: Click on any of the images for a solid full size image via Smugmug.

Get Visual SVN Installed.

As with most things, just leave the port as is.  INHO

Go ahead and leave the “Start VisualSVN Server Manager” checked so we can add a repository and all that good stuff.

This is the Visual SVN Microsoft Management Console plug in.  By far this is one of the most .NET friendly, Visual Studio friendly ways to use Subversion.  Go through and add your users, make sure one of them is your build account, and the respective groups that you want.  Once you are done adding the accounts and groups add a Repository.

Notice once you add a repository that there are three directories within the repository.

Once you get your repository created right click on it to get the “Copy URL to Clipboard” option.  This definitely beats needing to remember the path.

Once you do this make sure to add the Visual SVN UI to get the integrated VS.NET features.

Next thing needed is the build server itself.  Grab TeamCity from the JetBrains Site.

As usual I go with the default c:\TeamCity for installation.  I suppose if one wanted to follow closer to Microsoft standard installations they could go with c:\Program Files\TeamCity.

Leave everything here as is, unless you have something special in mind for you installations.

This is just fine too, no reason to change it.

For you security grognards, go ahead and stick it on whatever port.  Hopefully though, security protects the build server externally of the server.  There is no real reason to have a build server like this wide open for small group development.  So better just to keep this server behind a firewall and just keep it setup with defaults.

This screen I’m not 100% sure what the reason for it displaying at this point is.  These things are good defaults, so leave em’, hit save, and keep moving along.

Starting the services will not require a reboot or anything like that.  Jetbrains did an A grade job of the installation process for this software.

I always just leave the default check so that I can be sure the server and site are setup and running appropriately.

After you agree to the license the initial, one time only, Administrator Account Creation screen appears.  So create your account and you’ll be sent straight to the functional administration site.

Now it is time for the build process setup.  This is the good stuff.  If you’re working on this via the local server, after you click on Administration (red arrow below points to it), the path is usually http://localhost/admin/admin.html for local setups.  So it is handy to bookmark this URI.  The little red arrow below points to where the Create Project button/link/function is.  Click that and we’ll get rolling.

I just stuck this in here, because I don’t see things right in front of my face sometimes.  Once you have one project already, the Create Project button moves to center screen (at least in FireFox).  So don’t forget that and then not see it when you need it.

Name the new project, no description necessary, but always good to have one anyway.

If you don’t create a VCS root now, it will prompt during the build configuration setup.  Since I don’t want any extra steps, I always just setup the VCS root first.

Enter the appropriate settings, check the screen shot below with the red tagged items for examples.

Once the connection information is in place, hit the “Test Connection” button toward the bottom to verify.  A nifty little modal AJAX type dialog pops up to verify a good connection.

Go back to the project screen and click on “Create build configuration”.  I found it somewhat confusing that the VCS root isn’t displayed below after creation, at least in the order I did the configuration.  Maybe this is actually a bug, but I think somehow I circumvented the process somehow.  Anyway…

The rest is a pretty straight forward next, next, next type of browser/web based wizard.  First you’ll setup the general settings as below…

…then link the build runner up to the version control system setup earlier…

On the build configuration screen there is really isn’t much to fill out.  Select the sln2008 Build Runner option.  This will let you point this at a particular *.sln file of a solution to get the entire solution to build.

On the final screen hit done and you’re ready to go.  Click on the upper right hand side on the run button.  Then click on the Projects tab at the upper left hand side.  This doesn’t particularly seem intuitive at this point in the process, but it is how the app seems to work.  ( I highlighted this part as many seem to just scan over some key parts, namely this one )

Smile [:)]  Cheers!

After my ramblings, if you want to read more there are dozens of other blog entries on the topic.  Each of these entries Some of these entries I’ve included, so read away…

…and of course the actual product(s) and processes used.

kick it on DotNetKicks.com

Technorati Tags: ReSharper,TeamCity,Continuous Integration,CI,Build,Subversion,VisualSVN,Integration,Visual Studio

del.icio.us Tags: ReSharper,TeamCity,Continuous Integration,CI,Build,Subversion,VisualSVN,Integration,Visual Studio