About Us

Changing the Default CheckIn Option to Associate in TFS 2012

by Mike Douglas 9. February 2013 14:50

I recently had a team ask me about changing the default check in option from Resolve to Associate in Team Foundation Server 2012 (TFS 2012). I did some research and found there is a lot of confusion around the available options.  I am going to describe the two main options to help you decide which option will work best for you and your team.  So, why is changing this important? Our Deliveron ALM Delivery Guidance recommends that each person should update his/her tasks before stand-up each day.  We also recommend the hours be zeroed out for completed tasks, however the task should be left open until stand-up.  During the stand-up the task will be moved from Active to Closed where the team can celebrate the victory.  I have seen teams use clapping, snaps, and noise makers to name a few.   When developers check-in his/her code, they should always associate the check-in to the appropriate work item(s) but not choose Resolve.  Resolve is the default option but by choosing this, it will automatically close the Task bypassing being able to close it during the stand-up. 

image
Figure 1 – Resolve is the default option for Tasks and Bugs

Changing the option to Associate each time seems small but it would be nice to change the default option from Resolve to Associate.  In TFS 2010 it was relatively simple to change this by updating a registry key.  However, in TFS 2012 there are two options that address this in different ways.  Both options have some drawbacks. I will explain the two options and let you make the decision which you prefer.

Removing the Check-In Action from the Work Item Template (WIT)

One way to address this is to remove the Check-In action from each WIT.  Using the TFS Power Tools, you can remove the Action from the Transition.  In the Task, you need to remove it from the New –> Closed and the Active –> Closed transitions.  To do this, double click on the Transition title bar to open the Workflow Transition dialog.  Navigate to the Actions tab and delete the Action.  In addition to the Task, you should also remove this from the Bug WIT since these are the two types of work items that you would typically associate your check-ins to.

image
Figure 2 – Removing the Check-In action from the WIT

Once the WITs have been updated into your team project this will be available for all users.  Now when you add a related work item, the only option available is Associate.

image
Figure 3 – The default and only option is Associate

As I mentioned, this solution has some pros and cons. Here is a few to consider:

Pros

  • This change only has to be made the Team Project and nothing has to be done on the clients.
  • We recommend not resolving the work item, so removing this option is not a big deal.

Cons

  • This would need to be applied to all current Team Projects and would need to update the Process Template for future Team Projects.
  • This removes the Resolve option for users, so there is no way to perform this action anymore.

 

Updating Visual Studio clients to change the default option to Associate

This option sounds good.  Unfortunately it only works under one scenario.  With the Team Explorer 2012, there are two primary ways to initiate a check in.  You can initiate the check in from the Pending Changes Pane and from My Work Pane.  By default if you initiate the check-in from either location, the default option will be Resolve.  Once this fix has been applied, it will update the default option when initiating the action from the My Work pane but not the Pending Changes Pane.  I will show you how to set this up but first I will show you the scenario that doesn’t work and the one that does work.

From my experience, most check-ins are initiated from the Pending Changes pane or by right clicking on a location in Solution explorer.  Either way you will end up on the Pending Changes pane, where you can associate a work item by query or by ID.  Unfortunately the change has no effect on this and will continue to default to the Resolve option as shown below.

image
Figure 4 – Pending Changes still defaults to Resolve after updating the registry key.

In Team Explorer 2012, there is a new Pane called My Work.  This Pane is designed to group and manage all of your current work including code, break points, and associated work items.  This provides the ability to suspend/resume your current work so you can switch to work on something else and then come back to it later with everything the way you left it.  After applying the update, initiating the check-in from here will change the default option to Associate.

image
Figure 5 – Initiating the check in from My Work changes the default to Associate after the updating the registry key.

Now that you understand the scenarios.  To enable this option, each Visual Studio user will need to update the following registry key and change ResolveAsDefaultCheckinAction = False.

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Behavior

 

clip_image002 
Figure 6 – Set ResolveAsDefaultCheckinAction = False

Next, exit all instances of Visual Studio 2012.  Open the Developer Command Prompt for VS 2012 with administrator privileges.  Run devenv /setup to ensure that the registry is picked up by Visual Studio.

image
Figure 7 – Run devenv /setup to ensure registry change is applied.

With the change applied, the default option is changed for your My Work initiated check ins.

For this option, here are several pros and cons:

Pros

  • This change only has to be made once for it to apply to all TFS servers and Team Projects that you use.
  • This keeps the Resolve option for the most flexibility.
  • Only developers that want to change the default option will be affected.

Cons

  • Most check ins are initiated from the solution or Pending Changes where this update does not work.
  • Each Visual Studio user needs to perform this update for it to work for them.

Summary

As you can see there isn’t a perfect option.  Hopefully this gives you a complete picture of the options so you can make the best decision for your team. We chose the first option because the Resolve option would be rarely used.

Mike

Visual Studio ALM Articles and Book Involvement on MSDN

by Mike Douglas 11. December 2012 01:47

Recently, I have had two article published on MSDN and had the opportunity to help do a technical review for a book.  Here are the overviews and links to the full articles in case you missed them.

Testing for Continuous Delivery with Visual Studio 2012
This is an excellent guide for transforming traditional and manual testing practices to support modern iterative development with continuous delivery.  This book is available as a free PDF.  Here are some highlights:

  • Create and use effective unit tests, load, and performance tests.
  • Record and play back manual tests to reproduce bugs and verify the fixes.
  • Transform manual tests into code to speed up re-testing.
  • Understand how the lab environment works and how it supports a project.
  • Monitor your project in terms of tests passed.
  • Run build-deploy-test workflows on virtual lab environments.
  • Evolve your testing process to satisfy the demands of agile and continuous delivery.

Read More

 

Continuous Feedback using Storyboarding, Code Reviews, and the Feedback Tool in Visual Studio 2012 ALM
One of the key advantages of Agile or any other kind of iterative development process is to receive feedback early and often throughout the development process instead of waiting until the end. Traditionally this has been accomplished by teams working closely together where the decision makers can simply turn around to tell developers what they like and don't like. This type of collaboration becomes much more difficult with distributed development teams. Visual Studio 2012 has introduced several tools to help distributed teams collaborate better by being able to request, provide, and receive feedback throughout the development process.

Read More

 

Code Coverage in Microsoft Test Manager in Visual Studio Update 1
If you are QA professional, have you ever wondered how much of the application code is covered by your tests? Or if you are developer, have you ever wished you knew if there is any code that is no longer being called? Code Coverage for MTM makes it possible for QA professionals to know how much of the application code is being covered by Test Cases executed within MTM. Developers will know if all of code is being accessed by the application and a valid test case. Furthermore, developers can help the QA team identify scenarios in order to access the uncovered code blocks.

Read More

Where are Work Item State Diagrams in TFS 2012?

by Mike Douglas 21. September 2012 23:10

TFS 2010 includes the ability to display the state diagrams of the work items.  These diagrams map the workflow states and reasons of the work item.  This is very helpful to visualize and understand the the work item’s state workflow.  The process template guidance includes similar diagrams however, if you have made any changes to the state workflow of the work item, the diagrams will reflect those changes and provide some guidance on the state workflow.

To view this in TFS 2010, you have to use Web Access to open a Work Item.  In the main toolbar of the work item there is the option like in figure 1.  This is not available from Team Explorer or Visual Studio.

image
Figure 1 – State Diagram button in TFS 2010 Web Access

In TFS 2012, this option has been removed from the Web Access work items.  However, you can still get to this if you are using SharePoint.  Within SharePoint, you can create Work Items and still access the State Diagram button.

image
Figure 2 – State Diagram button in SharePoint 2010 with TFS 2012

When you view the state diagram it should look similar to this. 

image

Where are Work Item State Diagrams in TFS 2012?

by Mike Douglas 21. September 2012 14:10

TFS 2010 includes the ability to display the state diagrams of the work items.  These diagrams map the workflow states and reasons of the work item.  This is very helpful to visualize and understand the the work item’s state workflow.  To view this in TFS 2010, you have to use Web Access to open a Work Item.  In the main toolbar of the work item there is the option like in figure 1.  This is not available from Team Explorer or Visual Studio.

image
Figure 1 – State Diagram button in TFS 2010 Web Access

In TFS 2012, this option has been removed from the Web Access work items.  However, you can still get to this if you are using SharePoint.  Within SharePoint, you can create Work Items and still access the State Diagram button.

image
Figure 2 – State Diagram button in SharePoint 2010 with TFS 2012

When you view the state diagram it should look similar to this.  Any customizations to the work items will be reflected in the diagrams.

image

Visual Studio 2012 and Team Foundation Server 2012 FAQ and Links

by Mike Douglas 19. August 2012 17:31

It is an exciting time to be doing development using Microsoft Tools.  Visual Studio 2012 has just been released to the web.  I have compiled a list of the most common questions I have received.  Keep the questions coming.  I plan on doing additional posts as I receive more questions.

Where and when can I download Visual Studio 2012 and Team Foundation Server 2012?

If you are a MSDN subscriber, you can download it right now.  Both of these have been available since 8/15.  If you are not a subscriber, you can download the Visual Studio Express or trial editions of the MSDN editions.
MSDN Subscribers
Express Editions, Stand-Alone installers, and Trial Downloads

Can I connect Visual Studio 2012 to TFS 2010?

Yes, you can use Visual Studio 2012 to connect to TFS 2010 and you can use Visual Studio 2010 to connect to TFS 2012.  Connecting previous versions of Visual Studio to TFS 2012 require a GDR Update.  The update and full compatibility matrix can be found here.
Compatibility between Team Foundation Clients and Team Foundation Server

Where is the Alerts Explorer in Visual Studio 2012?

Alerts in TFS 2012 are managed through Team Web Access.  Also, TFS 2012 now includes creating and managing Team Alerts. See the link below how to create Personal and Team Alerts.   If you are using TFS 2010, the Alerts Explorer has been a part of the TFS Power Tools through Visual Studio.  The TFS 2012 Power Tools have not been released yet but the beta tools did not include the Alerts Explorer.  If you need to manage alerts in TFS 2010, I would recommend still using VS 2010 with the TFS Power Tools.
Set Personal or Team Alerts in TFS 2012

Can I upgrade my TFS 2010 Team Projects to include the TFS 2012 Features such as Review, Feedback, and Planning tools?

Yes.  If you haven’t made any customizations or limited customizations to your TFS 2010 Team Projects, there is a built in tool for upgrading your team project.  Even if you have made some customizations, there are some more involved options for upgrading.  Here is a good post describing the options.
Use the wizard to upgrade team projects in TFS 2012

Why are not all of the new features in my TFS 2012 Team Project available?

Some of the new features in TFS 2012 require some additional configuration.  You won’t see the Request Feedback link until you configure email and not all of the features on Team Web Access are available until set the appropriate permissions.  The following link explains how to enable these features.
Enabling Feedback Requests, the Backlog and Sprint Planning Features in Team Foundation Server 2012

What licenses do my users need for PowerPoint Storyboards and the Feedback Client Tool?

For Storyboards, users with VS Ultimate, VS Premium, and VS Test Professional can use the PowerPoint add-in to create the storyboards.  Others with PowerPoint, can view and edit the Storyboards.  The Feedback Client Tool can be downloaded and used by any user.  This does not require a TFS CAL or MSDN Subscription.  All of the licensing details can be found in the Visual Studio 2012 and MSDN Licensing White Paper.   If you have questions, I recommend contacting your Microsoft representative for the most accurate answer.
Download Feedback Client for Microsoft Visual Studio Team Foundation Server 2012

What if I have more questions?

These are just a few questions. If you have other questions post them on the MSDN Forums.  There are of community experts that monitor these forums and provide answers.  Also you can email us at tfs@deliveron.com if you also have questions.  

Adding Team Favorites to Team Foundation Server 2012 Web Access

by Mike Douglas 15. August 2012 19:30

Team Foundation Server 2012 includes a number of enhancements to Web Access for Agile Project Management and ALM process.  One of the new features allows you to update your Team Project’s landing page to include live tiles of important information called Team Favorites.  This provides a lightweight dashboard that is consistent in Team Foundation Service and on premise TFS 2012.  These Team Favorites can include the following:

  • Work Item Queries
  • Build Definitions
  • Recent Changes

When you first display the Team Project Web Access site, you may see the message “Some features of Team Web Access are not visible to you” that states that some areas are not available because you either don’t have permission or the access has not be configured yet.  Web Access now has three permission levels:

  • Limited – Provides the “View My Work Items” feature that replaces the Work Item Web Access (WIWA) interface in TFS 2010. This access does not require any kind of TFS license.
  • Standard – Provides additional features including Agile Boards and Standard Features.  This access requires users to have a TFS CAL.
  • Full – Provides additional features including Backlog and Sprint Planning Tools and Request and Manage Feedback.  This access requires users have Visual Studio Premium or Ultimate or Test Professional.

If all of your users are at least Standard or Full access, you can set this as the default permission or assign users or groups to these permissions.  See the following post on enabling the features and setting the permissions Web Access. Enabling Feedback Requests, the Backlog and Sprint Planning Features in Team Foundation Server 2012

Let’s assume you have a license to use the Full Permission.  Once you have this enabled, you will see the burndown chart and Iteration information (I’ll show you this at the end of the article). Below this is the Team Favorites section.  As you can see in the yellow message, there is where the live tiles will be added. 

image

I think it is going to be important for my team to know if there are any active bugs so they can be addressed appropriately.  Let’s add the Active Bugs Work Item Query to the Team Favorites.  To do this choose View work items link under Activities.  Then select the drop down triangle on the left of the Shared Queries > Current Iteration > Active Bugs query.  This will display the following dialog.  Chose Add to team favorites.

image

We encourage the developers on the team to check in often and it is important to have the visibility across the team.  To show this we will add Source Code activity for a particular branch.  In this example, I am adding the Main branch as the Team Favorite. Click on the SOURCE tab and then the drop down triangle next to the particular branch and choose Add to team favorites like above.

image

The last item I want to add to the Team Favorites is the build status of our Continuous Integration build definition.  This runs every time someone checks in the code so it is critical that this is always passing.  Providing this visibility helps ensure the quality of the application at any given time.  To do this, select the BUILD tab and then again follow the similar steps as above to add it as a Team Favorite.

image

Once all of the Team Favorites are selected, the team project landing page will display the live information.  Now our team has a single place to go to see the up to date health and status of our project.

image

Mike

What’s New in Installing and Configuring Team Foundation Server 2012

by Mike Douglas 15. August 2012 19:19

TFS 2012 has been released to manufactures (RTM) and as of today (8/15/2012) it is available to download for MSDN subscribers.  TFS 2012 includes a number of enhancements that I will be writing about over the next few days and weeks.  Today, I’m going to focus on what is new in the installation experience.  The experience has improved enormously over the years and the latest version continues to polish an already intuitive and straightforward process.  I’ll walk through the experience and highlight the areas with key improvements or other noteworthy items.

I am using a Virtual Machine with Windows Server 2008 R2 to perform a single server installation of TFS 2012.  I have installed the following pre-requisites on the machine before beginning the installation process.

  • SQL Server 2012
  • SharePoint 2010 Foundation
  • IIS Web Role
  • MS Office 2010

See the TFSInstall.chm file on the DVD (see below) for pre-requisite requirements and installation steps.

Installation

First, let’s look at the installation DVD root folder. 

image

There are a couple things to note. 

  • SharePoint Extensions are now called Remote SharePoint Extensions.  This should be helpful because it wasn’t clear in previous versions whether or not the SharePoint extensions needed to be installed on the same server with TFS.  The answer for TFS 2010 is the same for TFS 2012 and that you only need to install the extensions when SharePoint is on a remote server other than the same server as TFS. 
  • Also the Project Server extensions that provide server to server integration/synchronization between Project Server and TFS is not included on the installation DVD.  This extensions was originally released after TFS 2010 and packaged as a Feature Pack.  Now there is nothing else to download.
  • One other benefit of the new folder structure, is that you can simply run tfs_server.exe from the root to begin the installation process.  There are no more subfolders to search.

In TFS 2010, Microsoft separated the installation from the configuration.  This simplified many of the complexities and scenarios for setting up TFS.  With no surprise, Microsoft has kept that separation in TFS 2012.  The installation process begins with the typical installation start dialog.

image

This does require UAC administrative permissions to install.

image

While it was copying the files and running the installation, I noticed the TFS installation Windows 8 application style glyph (since we are not supposed to use the M word anymore…)

image

 

This completed the Installation step.  Next up is the configuration step.

Configuration

The TFS configuration tool gives you a number of options and settings for the various types of TFS configurations.  For this, I have chosen the Advanced option.  I personally prefer to choose the Advanced option in order to give me the most control.  The configuration tool also continues to provide options for configuring TFS Proxy, the Build Service, and the SharePoint extensions as it did with TFS 2010.  Two new options are the Visual SourceSafe Update tool and the PreEmptive Analytics Community Edition. I’ll cover the reasons for using each of the configuration options in one of my next posts.

image

The first step in the Advanced Configuration Wizard is specifying the database.  This step is very similar to TFS 2010 however, there is one new option to support the SQL AlwaysOn feature in SQL Server 2012

image 

Here is some additional information available when you hover over the information icon.

image

Next is the Account settings. This is the same as TFS 2010.  Nothing interesting to show here.  Even though it isn’t necessary, I still recommend using domain accounts if installing on a domain.

In the Application Tier settings, you can change the default port and IIS Virtual Directory but nothing has changed from TFS 2010.

The next few screens are for Reporting.  These are all the same as TFS 2010 so I skip adding the screenshots and settings.

The SharePoint settings are next.  You can choose to install and configure SharePoint on the same machine from here or specify that it is already installed.  I already installed SharePoint, so I chose the later.  With that setting the next screen the asks for the Site URL and and Administrative URL for SharePoint.

The Project Collection settings are the last option. Choose I name for your default collection.  I kept the creative name, DefaultCollection.

Once all of the settings screens are completed, the configuration tool will run through the Readiness Checks and verify that TFS is ready to be configured.  My VM was a little short on RAM so I received a warning but everything else checked out.

image

Click Configure to run the configuration process and when it is completed, you should get a screen similar to this one.

image

As you can see the experience is similar to TFS 2010 which is great.  Most users should feel comfortable with this interface.  It also includes some nice improvements in areas to continue to make it more polished. Feel free to contact me if you have any questions about installing/configuring TFS 2012 or learning more about implementing it in your environment.

Mike

Configure SQL Server 2012 Data Tools for ALM and TFS Features

by Mike Douglas 23. April 2012 13:41

SQL Server 2012 was just launched and is packed a number of new features.  See the Microsoft SQL Server 2012 landing page for more information on SQL Server 2012.  SQL Server 2012 includes everything you need (almost, as I’ll show you below) to being utilizing the ALM features in Team Foundation Server 2010 without the developer edition of Visual Studio.  I’m going to walk you though the options to install, the configuration, and the additional downloads to begin using all of the features.

If you opened SQL Server Management Studio 2012 then you have probably noticed how it now powered by Visual Studio 2010.  In addition, the Business Intelligence Development Studio (BIDS) has been renamed to SQL Server Data Tools (SSDT).  Not only is SSDT powered by Visual Studio 2010, it now includes the Database Project template.  By integrating “Data Dude” (Microsoft’s original code name for the database development tools that keeps sticking) into the SQL Server installation, I think Microsoft is sending the message that ALM features for database artifacts are very important for database professionals and not just developers. 

SQL Server Installation

This first step is choose the proper features when installing SQL Server.  If you have already installed it without these features, you will need to rerun the installation and add these features.  During the Feature Selection of the SQL Server 2012 installation wizard, choose the SQL Server Data Tools and Management Tools to install the Visual Studio 2010 powered client tools as shown in Figure 1.

image

Figure 1 – Choosing the SQL Server Data Tools

Once this installation has completed, the two client tool programs will be available from the Microsoft SQL Server 2012 program menu.

image

Figure 2 – SQL Server Data Tools and Management Studio programs

Enabling Database Projects in SQL Server Data Tools

Open the SQL Server Data Tools and choose New Project. The Business Intelligence project templates are listed below for Analysis Services, Integration Services, and Reporting Services.  The SQL Server item has the option to install the additional functionality including for Database Projects.  Choose this option to download and install the additional functionality.

image

Figure 3 – Microsoft SQL Server Data Tools (Web Install) option

The dialog appears and provides the option to Install the features.  Click Install to take you to the link below.

image

Figure 4 – Installing Microsoft SQL Server Data Tools

The Get Started with Microsoft SQL Server Data Tools page includes the instructions for installing the tools for both Visual Studio 2010 Professional (or above) and SQL Server Data Tools.  The second bullet covers our scenario of the Visual Studio 2010 Integrated Shell and will download all of the required components from the link.  Click on the Download SQL Server Data Tools link to launch the Web Platform Installer 3.0 to install the SSDT application.

image

Figure 5 – Get Started with Microsoft SQL Server Data Tools

Click the Install Now link to run the Web Platform Installer powered installation.  Then click the Install button below to begin the installation process.

image

Figure 6 – Install Microsoft SQL Server Data Tools

Once the installation completes, you will have the Database Projects template available to use, however not all of the functionality that was included in previous versions of the Database Project is available.  The SSDT team is planning on using the SSDT Power Tools as a the delivery mechanism to continue to add functionality to SSDT based on the users requests and needs.  The first release of the SSDT Power Tools adds Schema View to the Database Projects.  Download and install the latest version the SSDT Power Tools to add this functionality. Continue to monitor this post and the SSDT Team blog for further improvements. 

image

Figure 7 – SSDT Power Tools Download Page

Finally, when you reopen the SSDT, the SQL Server Data Project template is now available.  You can now create Database Projects to manage your database artifacts with rich features such as smart rename and schema compare.  Furthermore you can leverage these projects to create automated builds and deployments to align with the application source code builds and deployments.  See my previous post, Implementing Continuous Integration (CI) and Deliveron for SQL Server Databases for some background on Database Projects especially for automated deployments.

There is one critical capability missing with this solution so far.  The Database Projects are important for following Configuration Management (CM) practices but it is not complete without the ability to use them with a Source Control Management (SCM) system.  Fortunately, by being powered by Visual Studio, SSDT can be tightly integrated with Team Foundation Server 2010 (TFS).   TFS 2010 provides a number of integrated ALM features including SCM and is even free to install if you have a MSDN license.

image

Figure 8 – Create SQL Server 2012 Database Projects

Connecting to Team Foundation Server 2010

The Visual Studio integrated shell that powers SSDT does not include the Team Explorer component that provides the full integration with TFS 2010.  Team Explorer is a free download (but requires a TFS CAL, also included with your MSDN license) that you can install to add this functionality.  Download and install Team Explorer 2010.  When the installation completes, you should download and re-install the Visual Studio 2010 SP1 (this was automatically installed for you).  To connect to TFS 2010, first make sure the Team Explorer view is visible.  If not go to the View menu and select Team Explorer.  In the Team Explorer toolbar, select the plus icon highlighted below to open the Connect to Team Project dialog and then select Servers to show you the Add/Remove Team Foundation Server dialog. Finally, click the Add button to create the connection to the appropriate TFS 2010 Server.  In addition to the SCM features with TFS 2010, this includes bug tracking, agile project management capabilities, build automation, test case management, and more.

image

Figure 9 – Connecting to Team Foundation Server 2010

I hope this provided the information you need get started using Database Projects with SQL Server 2012.  In a future post, I’ll go into detail on how to use the Database Projects.  If you are using the Visual Studio 2010 Professional or higher, the same link above will install the capabilities for this.  Finally if you are using the Visual Studio 11 beta or newer, the Database Project template for SQL Server 2012 is already included.  You will also want to download the SSDT Power Tools.

Visual Studio 11 and Team Foundation Server 11 Betas are available

by Mike Douglas 4. March 2012 07:00

Last Wednesday (Leap Day 2012), Microsoft made Visual Studio 11 and Team Foundation Server 11 betas available for download.  This new version includes a number of new ALM features such as Code Reviews, Agile Project Management Tools, IntelliTrace in production, Unit Test multi-framework support, and many others.   

Use download links below to begin taking advantage of the new version.  These betas have a go-live license and will have a supported upgrade path to RTM.  In addition the new version can be installed and run side by side with previous versions of Visual Studio.  The VS 11 Beta can even open existing VS 2010 SP1 solutions without upgrading the solutions allowing other developers with VS 2010 SP1 to continue to work in the same solution.  See Visual Studio 11 Compatibility for more details.  View Product Highlights for Visual Studio 11 Beta for more details on everything that is included.

Downloads are available here:

In addition to the Beta downloads.  There was also a number of resources that also launched the same day to show you how to leverage all of the features in Visual Studio ALM 11. 

I have already started using the VS 11 beta for several projects and the new experience and features are great (I did switch the color theme to “Dark”). 

Mike

Adding BDD to TFS 2010 Test Cases

by Mike Douglas 12. December 2011 19:33

Team Foundation Server 2010 provides functionality for testing applications with built in support for test plan and test case management    In our Agile/Scrum projects, we define all of the Test Cases in our planning meeting to define done for each User Story.  When starting new projects, team members often ask is how to format the Test Cases so they are clear.  One way we have found to be very useful is to use the same format as found in Behavior Driven Development(BDD).  BDD uses a format for communicating Test Cases called Gherkin.  The Gherkin format follows the pattern below:

image

Figure 1 – Given, When, and Then definition

Just like the User Story format (As a [user], I want to be able to do [business process], so that [business value]), we have found the Gherkin format is very useful for teams learning Agile.  In fact, these Test Cases can be written for Acceptance/Functional tests and for Unit Tests.  When we work with customers and our own projects we install our customized Deliveron Agile Process Template as part of the Deliveron Agile Delivery Process.  The Deliveron Agile Process Template is a slightly customized version of the MSF for Agile 5.0 process template.  In the Test Case work item, we have added fields for Given, When, and Then.  The “Then” should also match the expected result in the test steps.

SNAGHTML3f2b686e
Figure 2 – BDD additions for TFS Test Case Work Item

image

Figure 3 – Expected result matches the “Then”

Customizing the TFS Test Case Work Item Templates (WIT)  to add these fields is straight forward.  Follow the steps in this post I did a couple years ago.  It was for TFS 2008 but the steps are the same in TFS 2010.

In summary, use Test Cases to define done of the User Story and use BDD and Gherkin for the language of the Test Case.  Feel free to contact us if you have any questions about these changes or about the Deliveron Agile Delivery Process.