Compress a string with zip

[UPDATE START]

We found a nasty performance bug in the code below. The DeCompress method copies a string for each turn in the loop. That is a classic problem that creates a new copy of the string for each row. That became a major problem for a 3.8 MB string…

I have now updated the code to use the System.Text.StringBuilder object instead. That took down the speed to about a tenth. Sorry that I didn’t catch that…

[UPDATE STOP]

We had a quite special need the other day; we wanted to compress a part of our request, namely an XML string that was sent to us.

Most of the examples I found on the net showed how to compress the content of a file. But here is the code that compresses a string. The code uses ICSharpCode.SharpZipLib. Here you go:

UTA058 The test engine cannot run tests in the assembly for our integration test

We have a MsTest DLL that contains our integration tests, which is run after each deploy to our daily build environment.

However, on our new build server, we ran into problems with the following error message:

“UTA058: The test engine cannot run tests in the assembly”

It seems that you need to configure the .NET Framework to allow running assemblies from network shares.

I found this description on how to solve it (potentially the longest URL on the net ;)).

But we ran into more trouble… The .NET Framework 2.0 Configuration was nowhere to be found. As it seems, this tool disappears when the .NET Framework 2.0 SDK is installed. Where it disappeared to is another question that I haven’t found an answer to.

However, the great description also told us how to handle the problem on the command prompt, with the caspol...

Read More

SOAP UI - a great way to do integration tests for services

Just found this tool - or actually, I’ve used it but missed its greatness…

SoapUI can be used to automatically generate clients to access web services. But furthermore, it can be used to test web services. With the tool, you can generate test requests and set up the expected responses. This is set up via a nice GUI.

The requests and responses can then be run, in sequence or one by one.

What a great way to do integration tests for a service. Just imagine - you have 100 pre-built request/response files and can run them (from the command prompt as part of your nightly build, of course).

Since not much coding is required, you can easily put SoapUI in the hands of a tester and maintain the requests/responses as checked-in files.

Now we just need to find a way to run the test against...

Read More

Abbe - a December update

I know that a lot of people has been wondering why no new pictures of Abbe has been on display here for a while. Well - a too busy autumn may be one reason. Any-who - here you go…

Almost forgot - he said a very loud and clear “PAPPA” last week!

Read More

Christmas times - hectic times

A very hectic time is closing into an end… the day after tomorrow will be the first day in ten days that I’ve been free after work. Phew! To much!

But fun stuff too:

  • We did two concerts with my Salvation Army Corps and they were both great. The Vasa Band and Vasa Gospel holds these concerts each year. This year at our newly renovated corps. I was in the planning group as well as doing the presentations during the concert. Very fun!
  • This weekend was another highlight since I (once again) was presenter for the Lucia-concerts of the Windcorp Brass Band. This year I even got the opportunity to play with them due to a late change in the parts. Also the guest soloist was Richard Marshall of the Black Dyke Band, which is a bit like a football player that get...
Read More

Working directory for Build Agents and building different branches

We have been chasing a strange problem for a few days now. The scenario is as follows;

We created a new TFS build server, that is - we set up the build service on a new server. In our TFS Source control we had two branches with a build definition for each. Finally we set up a Build Agent for the new server via Visual Studio Team System.

But the builds failed! With error message “The path [path] is already mapped in workspace [workspace]”

We didn’t get why until we checked a property on the build agent; Working Directory. This can be set by right-clicking on the Builds-folder in Team Explorer, choosing the agent and the Edit.

On the Build Agent Properties page there is a WorkingDirectory-textbox. This dictates where the agent should build. However - what not is shown is that you can use a variable in the path:...

Read More

What is a workspace in TFS?

This question has puzzled me for quite some time. It’s so vague and fluffy at the edges. However, here is a great article that describes what it is - and I am so relieved that I wasn’t completely stupid.

The term is quite fluffy and can be described as “the things a user works with on a local computer”. Or to put it more elegantly, as Martin Woodward does, “a container that bridges the gap between your local computer (acting as a TFS client) and the server”.

Read More

MSBuild sidekicks

This tool, MSBuild Sidekick, looks quite promising. It’s a graphical editor with which you build MSBuild project files.

I am always quite skeptical of tools that let you “draw code” that you can easily write yourself. But this tool seems to hold some very useful features. I’ll try to experiment with it when I get the chance.

Read More