Integration Testing with Unit Tests and MSTest

Visual StudioIn many of the projects that I have worked on, the application we’re building needs to integrate with a back-end system or a web service layer that is maintained by a third party or by another team.  In these cases, we shouldn’t assume we’ll have the ability to ensure that the other group has set up an automated test bed to verify regression.  Especially if that other system is having changes made to it to support the project!

This is where integration testing comes into play.  There are a few things that you should be doing with your unit tests to ensure your integrations continue working throughout the lifetime of your project, and also that your automated tests are running efficiently so that your team is not slowed down waiting on expensive integration unit tests that are running for long periods of time.

Continue reading Integration Testing with Unit Tests and MSTest


Applying Parameter Templates to the Sitecore Sublayouts

SitecoreI recently got into a discussion on LinkedIn on how to let the Sitecore authors style their pages more easily, and it seems like folks out there are still a little confused on how to use parameter templates for your sublayouts.

I guess the first thing that everybody should know is that you don’t NEED to use parameter templates to make your authors make choices.  If the choice is going to apply across the entire visualization of the page, that starts to sound like something that should be on the content item data template, not on the sublayout.

However, with DMS and personalization, we find ourselves building a lot more components into our solutions, which means the authors now need to be able to provide configurations at the sublayout level instead of the content item level.  There could be three promo boxes on a page, for example, and we cannot apply a single configuration from the content item to all three.  Parameter Templates allow us to provide the author with a sublayout configuration interface that is more familiar and straight-forward then providing key value pairs using the standard configuration fields that are available out of the box.

My colleague Nick Allen and I did a series on this a while ago, and Nick really did a deep dive into this with some great examples.  Take a read:

  1. Introduction to Sitecore Parameter Templates: Making Sublayout configuration more intuitive
  2. Introduction to Sitecore Parameter Templates: Sitecore client configuration deep dive
  3. Introduction to Parameter Templates: Accessing Sublayout parameters using the Sitecore API

ALM Summit: Day Three

ALM Summit 3 Logo The conference is all done, and I’m finally home from Seattle wishing there was more, but also really wanting to get back into the office and share what I’ve learned.

I met some incredible people this week, and had some great conversations around the breakfast table, over beers, and in the hotel shuttle rides.  I am really going to miss that warm weather, even if it was always raining, because it’s some 20-30 degrees colder back at home right now.

Like the rest of the days, Day Three started with a breakfast followed by a keynote.  We were not disappointed… Continue reading ALM Summit: Day Three

ALM Summit: Day Two

ALM Summit 3 Logo

Wow, day two is in the books… where to start?  Well, maybe I’ll start at the end:  Free beer and buffet for over 3 hours definitely provided a nice finish to the end of the day.  I didn’t network the way I imagine I was probably supposed to: milling around the room and trying to make contacts.  Instead, I sat with two great guys (both from Canada) in a booth and talked about stuff while we drank and ate for several hours.  Enough about that, though, what about the sessions?

Continue reading ALM Summit: Day Two

ALM Summit: Day One

ALM Summit 3 Logo

I’ve never been to a conference like this before, so I wasn’t sure what to expect.  The conference kicked off Tuesday at the Microsoft Conference Center in Redmond, which is a beautiful building, even if I’ve only seen the conference rooms on the bottom floor so far 🙂  The start-time for registration said 7:30am and it was running all day along with an Expo Reception that wrapped up at 8pm, so I was prepared for a very grueling day, but it turned out to be some of the most fun I’ve had talking shop with other industry folks.

I attended sessions from a mix of the DevOps, Agile Development, and ALM Leadership tracks. I won’t go into detail on every single thing said in these sessions, especially because the videos will surface in a few weeks and I can just link to them then, but here are a few highlights and notes from the sessions I was able to attend.

Continue reading ALM Summit: Day One

Automating Sitecore Deployments with TFS and TDS

Visual StudioDuring development, your team makes a lot of changes to fields, templates, presentation details, and various other elements that need to be tracked, verified, and deployed.  You need a way to source control those database changes, and then make them available to your team to test.  Here’s how to accomplish that using Team Foundation Server (TFS) and Team Development for Sitecore (TDS)!

Sitecore content items in source control

Our teams use Team Development for Sitecore from Hedgehog Development to create .NET TDS projects to source control the changes we make in the Sitecore database.  There’s a great guide from Hedgehog to start with, and I’ve previously written a post on some project configuration basics.

Automating deployments of Sitecore content items

With your content items now in Source Control, you can start getting your database changes deployed along with your build.

Note: This assumes you are automating your file deployments to push code changes out to your environments.  If you aren’t yet, you should be!  Look for my upcoming posts on setting up deployment build configurations.

In order to get TFS to be able to deploy, there are a few things you need:

Continue reading Automating Sitecore Deployments with TFS and TDS

Swimming against the waterfall…