I wrote a while back about how I managed to add logging with log4net to my ProjectWhite tests in Visual Studio. However, after being forced to move my source code it suddenly didn’t work anymore eventhough I followed my amazing instructions. After trying a whole bunch of things out, one of them worked.
For log4net to work, the log4net.config file needs to be copied into the TestResult folder created by Visual Studios testrunner. In order to achieve this, enter the “Test” menu in VS, select “Edit Test Run Configurations”, “Deployment” and there, add your log4net.config file.
This made things work for me.
Note: I’m using the built-in testrunner in Visual Studio to drive my tests and not NUnit right now.
Note2: The first thing I did was setting it up as I did in my previous post, I haven’t tried to see if just adding the file to deployment is enough, it might not be.
Lately I’ve been receiving confirmation that the title I chose for my blog really is something that want to aspire to.
First, a talk with my colleague M. I wanted to know what the big deal with releases is. Since I keep hearing about release configuration and the company that I work at has hired a release manager it seems to be something very complicated. The manager of our IT departement tried to assure me that adding configuration management made their code testable. I failed to understand him but smiled and looked happy (it wasn’t a good moment for a discussion).
The answer M gave me was that it shouldn’t be a big deal. He then looked me in the eyes and added “And don’t let anyone tell you otherwise.”. It makes sense to me that if people make this huge deal about releasing code it turns into something scary and difficult. And there is a risk with that, it turns into something you would rather do as little as possible.
The conclusion, releasing code should be simple.
Another hint was a podcast from .NET Rocks that I listened to on my bike ride to Old Campus. The topic was James Kovacs on Convention over Configuration. The message was simple: by using conventions rather than configuration setting things up can be done in a much simpler manner. You don’t need to worry about the “plumbing” in the same way. Also it makes your systems easier to test since it is possible to test the convention and then be assured that it is working.
Here, implementing code should be simple.
As for me personally, I want to have the time for my 2 year old, roleplaying Star Wars, listening to podcasts, working out, sewing, etc, I don’t have the time or energy for complicated.