SPG Continuous Integration builds not run on instance of SharePoint

Our Continuous Integration builds are run on a build server that has the necessary SharePoint assemblies, but with no installed instance of SharePoint. Licensing issues aside, this causes an interesting problem when unit tests are developed on dev boxes that have SharePoint installed. Several services found in the SPG Partner Portal application access SPFarm.Local. Developers…

2

Using Typemock Isolator for Integration Tests

Yeah, I know. Typemock Isolator is great for unit testing against API’s that are hard to mock, but this last iteration, I found a new use for Typemock Isolator. I worked with our test team to develop a set of integration tests that are run by MSTest and simulate running our components in the context…

1

What happened to my SPContext?

This last iteration, we ran an interesting issue when services that we request through the SharePointServiceLocator depend on SPContext.Current. This seemed like a reasonable dependency assumption. We consume these services in feature receivers. They work fine when activating the feature via the SharePoint web UI, but don’t work when activating the feature via STSADM –o…

2

Stack Overflow when building up SiteMap structure

In iteration 10, we wrote HierarchicalConfigSiteMapProvider that builds up a tree of sitemap nodes based on xml retrieved from the hierarchical ConfigManager. Being a newbie with SiteMapProviders, I overwrote BuildSiteMap calling a simple recursive method that traverses the xml and builds corresponding sitemap nodes. All of a sudden I get a stack overflow exception. No…

2

Granularity of SharePoint Features and Solutions

In our SPG v1 guidance we discussed packaging site elements into features. This is particularly important if you are using the Visual Studio extensions for WSS. We found that whenever you add a site element into a VSeWSS project, a new feature is created for the site element. This lead to an excessive number of…

1

SPG v2 Iteration 10 Drop

Iteration 10 is complete and the drop can be downloaded here. In iteration 10 we mainly concentrated on refactoring, code cleanup and reusable assets. We will continue refactoring and scrubbing the code in the remaining iterations but please take a look at what we’ve done so far and provide us feedback. Hierarchical configuration: the ability…

1

SharePoint Development Guidance v2

We are now full speed a head working on v2 of the p&p SharePoint Guidance. Version 1 focused on issues common to both WSS and MOSS development like unit testing, deployment, and upgrading. For version 2, we’re looking at the following topics: Performance and scalability MOSS caching ASP.NET cache SharePoint session state Data and services…

0

Sometimes Typemock Isolator can be too powerful

A colleague made the comment regarding Typemock Isolator: “but be aware that having such a powerful mocking facility may reduce the effectiveness of your unit tests as design aids”. I’ve used Typemock Isolator and it allows you to test your business logic even if it is poorly factored. For example, let’s say you have some…

2