Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Boosting integration testing with Azure development fabric

I posted previously about manually spinning up Azure storage emulator in the development fabric so that it can be used with integration tests. Ever since then I have been using a vastly updated version of the code I previously published.

This updated one might be helpful for others to leverage as well. This version allows for starting and stopping both the storage emulator and the compute emulator. It makes its best attempt at automatically finding the Azure project service directory and the service configuration for the current build configuration. If this does not work for your scenario, then you can also manually provide this information.

Read More

SSAS fails to process TFS cube in Tfs_Analysis

One of the TFS instances that I am responsible for started failing to process its Analysis Services cube a few days ago. The nature of the environment is that I can only do a reboot after hours. I also wanted to try to find out what was wrong before resorting to a reboot so that we could try to fix the problem rather than just doing a band-aid.

The topology of the TFS deployment is the following:

  • TFS App Tier – also hosts SSRS
  • TFS Data Tier – SQL Server, SSIS and SSAS
  • TFS SharePoint Tier
  • TFS Controllers
  • TFS Build Environment
  • CI Host Platform

[Full Analysis Database Sync]: [Full Analysis Database Sync]:

Read More

Quick Poll–UX of UI navigation for list with a single item

I’m after some feedback from the community regarding the UX of UI navigation when dealing with a list of items where there is only one item in the list.

I have a scenario in a UI where there is a list of subscriptions for a user account. Most of the time (~>90%) there will only be one subscription. There are two options for handling this.

  1. Always display the list when the user navigates to the list UI and force the user to manually select the only item available
  2. Automatically redirect the user to the item display screen if there is only one item

Option #1 is consistent but includes an unnecessary navigation (+ human intervention). Option #2 is streamlined, but provides an inconsistent UX when the list changes to have a second item.

I have leant towards #2 because of the expected metrics of my specific scenario in addition to it being more streamlined. The point of inconsistency is a thorn in my side however.

Thoughts? Votes? Any UX experts want to shed some opinions?

Read More

Finding solutions not covered by automated builds

I am slowing building a set of automated tasks in my current role as a TFS administrator to verify the state of TFS. My latest task looks for solutions that are not covered by automated builds.

It’s a fairly straight forward task that enumerates solution files and matches them to build definitions across all projects and collections in a TFS instance.

Read More

Refreshing an expired STSTestCert WIF certificate

I have been using WIF for the last couple of years on a few of my projects and the STSTestCert gets a bit of a workout on my development machines. This certificate is only valid for 12 months. All the applications that use this test certificate will fail to execute authentication requests once this certificate has expired.

Here is the easiest way to renew the certificate.

  1. Open up MMC and attach the Certificate Manager plugin for the local machine.
  2. Navigate to Certificates (Local Computer) -> Personal -> Certificates.
  3. Select and delete the expired STSTestCert certificate.
  4. Open VS with elevated rights
  5. Add a new solution
  6. Add a new STS project to that solution using the Tools -> Add STS Reference… menu item
  7. Continue through the wizard
  8. Refresh the MMC console and you should now have a fresh STSTestCert


Read More

How much do I love the yield statement?

Quite simply, a lot. The yield statement seems to be such a simple part of C# yet it can provide such amazing power (being delayed enumeration). Outside of that power however, it can provide beautiful simplicity.

Take the following abstract class for example:

Read More

Configuring a TFS 2010 build agent to compile SharePoint 2010 projects

I’ve been doing several TFS consulting gigs over the last couple of years. The one thing that keeps popping up is the requirement to build several types of platforms using TeamBuild/TFSBuild. My preference is to isolate build agents and their customisations. This means for example that I have a mix of build agents like the following:

  • Standard (full VS install + any common additions - WiX for example)
  • SharePoint
  • BizTalk

Tagging the build agents and configuring the build definitions for those tags then allows the build to be directed to the correct build agent.

Read More

Integration testing with Azure development storage

I’ve been working on some classes that write data to Azure table storage. These classes of course need to be tested. Unfortunately the development fabric only spins up when you F5 an Azure project. This is a little problematic when the execution is from a unit test framework.

Some quick searching brought up this post which provides 99% of the answer. The only hiccup with this solution is that it is targeting the 1.0 version of the Azure SDK. I have updated this code to work with the 1.6 version of the SDK.

Read More

Performance Testing a Load Test

Running a load test in Visual Studio is a great way to put your code under stress. The problem is that once you have identified that there is a potential performance issue, how do you then narrow it down to particular methods in your code base. Using a Performance Session is great for this.

The problem is that Visual Studio does not provide out of the box support for running a performance session against a load test. There is a reasonably easy workaround though. Any other profiling tool will also work using the same technique. The trick is to get the performance session to manually profile mstest.exe as it runs the load test.

Read More

Movember - Please donate

It’s not often that I post something personal on this blog. Movember is an important cause so I’ll make an exception.

It’s Movember and time to focus on men’s health. To show my commitment, I’m donating my face to the cause by growing a moustache for the entire month of November, and need your support. My Mo will spark conversations, and no doubt generate some laughs; all in the name of raising vital awareness and funds for prostate cancer and male depression.

Why am I so passionate about men’s health?

  • 1 in 9 men will be diagnosed with prostate cancer in their lifetime
  • This year 20,000 new cases of the disease will be diagnosed
  • 1 in 8 men will experience depression in their lifetime

I’m asking you to support my Movember campaign by making a donation by either:

  • Donating online at:
  • Writing a cheque payable to ‘Movember’, referencing my Registration ID: 2443216 and mailing it to: Movember, PO Box 60, East Melbourne, VIC, 8002, Australia

If you’d like to find out more about the type of work you’d be helping to fund by supporting Movember, take a look at the Programs We Fund section on the Movember website:

Thank you in advance for supporting my efforts to change the face of men’s health.

Rory Primrose

Read More