Blogging in two places - Avega Group Blog
Avega is starting up a
and have asked me to post some posts there. Sounds great so I have just
posted in some items from www.marcusoft.net
to my “Avega”-alias.
http://blog.avegagroup.se will not be live in a few weeks though, so
keep cool until you can read me in … stereo. ;)
A few interesting questions arose:
How will Google
tackle the indexing. Will a search for “marcus hammarberg” yeild a
hit at the Avega-blog before
How to use
Live Write (which I have fallen in love with) with
(the Avega blog engine of choice)?
Luckily there is a simple solution here.
Abbe - going strong
Here are some of the latest pictures of Albert (and one that includes
Elin). He’s sick right now but the mood is still on top.
Missing references showing nicely with ReSharper
I found a feature that I thought was bug in Visual Studio… If you have
ReSharper (4.0 in my case) installed it shows your
missing references directly in the .config-file.
Of course there are limitations of this - secondary references cannot be
resolved but it is still a great help. Unfortunately it confused me for
a while thinking it was a bug in the config editor of Visual Studio. But
I take that one on me.
Regular Expression for even number
Let me first be very clear - I’m not a
RegExp-guy. I find them quite hard to understand at
times and often take my refuge to the .NET-code.
Also I was very surprised to not find any hits for the search of “RegExp even numbers” - I thought that I would find
But after reading a bit at
place I learned enough to create my first own, naïve regular
expression - a regular expression to allow only even numbers:
Again - my apologies for being a newbie on this… but hey it works.
I also found
this resource very useful for trying my expression
Regular Expressions are very powerful but
“with great powers comes great responsibilities”…
that is they are often hard to understand.
Thanks Fredrik S for the links.
The right way of calling MSTest in a TFS build script
OK - sometimes it just to confess - I took a chance, or didn’t know
what I was doing - call it what you want.
In TFS Build-scripts there are a much nicer way of calling MSTest than
the Exec-task as I
There is already a task for it, called
With this task you can much easier reach all the properties you need.
And it even contains some undocumented features such as the
Here is my updated version on how to call the task:
How to run MSTest with publish parameter as MSBuild Exec-task
[UPDATED, see this] I have created a task that runs some unit tests in a certain DLL and the publish the result to a TFS service. We use this task in our TFS MSBuild script in order to execute some integration tests in the last step of the build process. In order to get some value from the integration tests the solution needs to be deployed, for example. The most tricky parts of figuring this out was: The path to MSTest.exe - as it turns out there are a environment variable to the root of the Visual Studio Tools - %VS90COMNTOOLS%. And via that we can reach MSTest.exe with %VS90COMNTOOLS%\..\IDE\MSTest.exe To publish a build you need the buildId to send to the publishbuild-parameter of MSTest. It can easily be obtained from the TFSBuild parameter $(BuildNumber) So here you are - my task to run tests and publish the results: <!–...
Marcus - now in full color video...
I had a quite strange experience today. I did a presentation about unit
testing for another project. Nothing strange there. But the thing was
recorded (via LiveMeeting,
worked great after some initial confusing surrounding the mic) and then
put out on the developer portal of my customer.
So later on I heard my lame jokes echoing through out the nearby
workstation. Excruciating painfully… it’s just not funny the forth
time you hear your own jokes…
Quite cool experience though. I like doing presentations.
Automation of integration tests
In my current project we have reached a very good code coverage percent (98,7 %, yes we are proud) - but we are aspiring to take it a step further. We are now constructing a series of integration test, used to run through the actual production code an verifying that everything works as expected. Said and done - I implemented a few test that did that. Soon though some questions and problems arose; Integration test assumes that something is released and the that tests are executed against that release You don’t want the integration test to be executed when a developer is running the unit test on his development machine inside Visual Studio. When looking around on the net it seems that many people are missing the Category-attribute from NUnit in MSTest. That looked like a very nice way to solve the problem but it is not present in MSTest....
Oracle, ODP.NET, TFS Build and running tests under service account
We have for several days now been chasing a bug for a couple of days now. Very, very annoying… Here is how it goes: We have a unit test on that calls an stored procedure in Oracle, using ODP.NET. On our local machine (and also on the test server) everything works fine. But when the build script is running the unit test, a out-parameter of the DATE-datatype was always returned as NULL. This was so strange since it’s the same code against the same database instance. The difference was that is was another account, the TFS Build Service Account, that was running the tests. The solution was to configure the regional settings for TFS Build Service Account to use Swedish (in our case) Regional Settings as the default user profile. **[UPDATED] **That checkbox should be checked! So good to solve this. Thanks to the anonymous “client dude” that helped us...
First and foremost- I love Resharper (4.0), but I think that some small flaws are still there and does bad things… Two things are at the top of my list (in all honesty I must admit that I can’t be 100% sure that ReSharper has to do with this but both of them has occurred after I’ve installed ReSharper): ASPX-pages are very, very slow to load in design-mode. It can take about a minute to switch from the html-code to the design-view The Build supervisor (you know, the view where you stare at the progress of the build, keep your fingers crossed and hopes for only green dots…) crashes very frequently. I have reported these bugs to ReSharper and hope that a fix will be available to fix this. I still love Resharper though. Oh yeah - that’s right - I found that the TFS Web Access has some great...