Scrum: How to deal with bugs during a Sprint?

February 1, 2010

Lately I got a question how a development team should deal with bugs which are found by the development team during a Sprint in progress?

In my opinion it’s not good to postpone fixing bugs to a later date or other Sprint. Bugs should always be fixed as soon as possible before other development work may continue. In the long run it will always be cheaper to fix bugs as they come. Putting them off to the (near) future may result in a more complex bug and will also require a larger context switch for the person who will be responsible for fixing the bug. Also make sure that bugs are visible for the entire development team. If you are using work items, be sure to create a work item for the new bug and enforce that the developer associates this work item to his check-in/changeset that will fix the bug. Maximum traceability! A good reflex to a new bug would also hold in to create a new (unit) test for regression testing in next releases.


VISUG session Intro to ALM with VS2010

January 27, 2010

Today I delivered an evening session on Application Lifecycle Management with VS2010 for the Visual Studio User Group in Belgium.

35 people showed up at SD Worx in Antwerp.

During one hour and 30 minutes I managed to give a brief introduction to the product features of the upcoming release of Visual Studio 2010. In the first part I covered some slides and did a live basic installation of TFS2010 on Windows 7. In the second part I demoed some of the cool features of Visual Studio 2010:

  • Team Foundation Administration Console
  • Attaching Team Project Collections
  • Branch Visualization features in Version Control
  • Team Builds 2010 (Gated Check-In)
  • Running manual test cases in Test & Lab Manager
  • Creating a coded UI test from action recordings
  • Architecture Explorer

The slides are available for download!


Running Coded UI Tests (from action recordings with MTLM) in Team Builds (TFS2010)

January 21, 2010

With Visual Studio 2010 (Premium/Ultimate) we are able to create several types of automated tests. Automated tests will execute a sequence of test steps and determine whether the tests pass or fail according to expected results.

Coded UI Tests provide functional testing of the user interface and validation of user interface controls.

How to create Coded UI Tests? You could create them directly into Visual Studio, but for this blogpost I want to start from an action recording in Microsoft Test and Lab Manager (MTLM). An action recording is quite useful in manual tests that you need to run multiple times and for recycling common steps in different manual tests that contain shared steps.

I did create a simple test case with different test steps in MTLM to test some behavior on my website.

TestCaseDefinition

From MTLM I started a test run for this test case.

TestSuiteOverview

Before running the test, I do need to check the action recording to be sure to capture my actions for this test.

CreateActionRecording

The Test Runner will give a detailed overview of the recorded actions. Afterwards you will be able to replay all these stored actions in the Test Runner.

ActionRecordings 

After saving the results of this test run (all data is associated to my test case) it’s time to open Visual Studio 2010 and to create a Coded UI Test.

TestCaseAttachments

CodedUITestStart

Instead of choosing the default option to record actions I did choose to use an existing action recording after which I need to retrieve the appropriate test case to link to the associated actions.

ActionRecordingPicker

By clicking OK, Visual Studio will start generating code that will represent my actions that were recorded in Microsoft Test and Lab Manager. On top of that you are also able to add assertions on parts of the user interface in a separate Coded UI Test that you may reuse in other Coded UI Tests.

CodedUITestAssertions

Now, let’s integrate this entire UI test (MyCodedUITest) into the automated build. I created a default new build defintion where I also enabled to run the automated tests.

BuildDefinition

To run unit tests that interact with the desktop during a Team Build, we need to modify the Build Service Host properties in the Team Foundation Administration Console to run the build service as an interactive process instead of running the build service as a Windows Service.

BuildServiceHost

That’s about it. Make sure that the Build Service Host is running in the command line that will pop up after starting the BuildServiceHost. Queue the build and explore the results!

TestResults

Done!

With this post I wanted to highlight the powerful integration of (automated) testing into the upcoming Visual Studio 2010 offering.


Code Coverage results with Team Builds (TFS2008)

January 20, 2010

From Wikipedia:

Code coverage is a measure used in software testing. It describes the degree to which the source code of a program has been tested.

I won’t start the discussion what’s a good percentage for code coverage and why you should care or not, but let me just say that Code Coverage results may be very welcome while testing your applications. We all know that 100% coverage for a specific application doesn’t mean that your application is fail-proof and it won’t tell you how good your unit tests are. But it may give you a nice indication of the reach of your unit tests and those results should always be combined with other metrics of your code/tests.

Recently I noticed a strange thing when setting up unit tests (including code coverage) in Team Builds for TFS2008. To run unit tests after the compilation process in the build, you basically have two options.

  1. specify test list(s) in the vsmdi file

    option1vsmdi 

  2. specify test containers  

     option2testcontainer

 

Now the tricky part about code coverage results, considering you have a solution with unit tests where you enabled code coverage in the testrunconfig file.

testrunconfig_codecoverage

Setting up a Team Build with activating unit tests via a vsmdi file will give you the requested Code Coverage results.

buildresult_option1

On the other hand, setting up a Team Build (same solution) with enabling unit tests via a test container won’t give you the desired Code Coverage results.

buildresult_option2

Why is that?! Well, Code Coverage settings are contained in the testrunconfig file and the thing is that the vsmdi file contains a reference to this testrunconfig file (open up notepad to verify), while the test containers don’t have a link with any testrunconfig file. If you want to include a testrunconfig file to your build that will be used during the execution of the unit tests, you need to specify the RunConfigFile property in the TfsBuild.proj file so that the Code Coverage settings are picked up during the run of the unit tests.

option2_solution

Result:

option2_result


New Training offering by Sparkles + Speaking at TechDays Belgium 2010

January 19, 2010

With my new company Sparkles I don’t only provide ALM consultancy services, but I also try to setup advanced training courses in Belgium with local and international experts.

An exclusive partnership with IDesign is set up to bring the best training to Belgium. IDesign’s training courses are among the world’s most intensive, most comprehensive .NET training classes given by the IDesign architects who have a world-renowned reputation as industry leaders. The IDesign architects are all frequent speakers at major international software development conferences, where they present their techniques, ideas, tools and breakthroughs.

In the week of March 1, 2010, Brian Noyes (Chief Architect at IDesign) will be in Belgium (Antwerp) for delivering an intensive 5 day training on Architecting WPF Applications.

On May 3-4, 2010, I will also deliver for the first time a detailed training on the new Application Lifecycle Management features of Visual Studio 2010. The Training class is called ALM with Visual Studio 2010.

This year Microsoft Techdays in Belgium are scheduled on March 30-31 + April 1 and I’m confirmed as a speaker. I will deliver a session on Branching and Merging with Team Foundation Server 2010.

In January I’m also starting to setup Team Foundation Server 2010 (Beta 2) at 2 new clients. More and more small development shops also see the benefits of a fully integrated development platform. Those companies that were still in doubt a few years ago are now convinced because of the promising upcoming release of Visual Studio 2010. The ALM train is on the rails! Very busy, but exciting times!


Application Lifecycle Management with VS2010

December 12, 2009

More than a week ago I did my first training (2 days) on Application Lifecycle Management with Visual Studio 2010. This was the agenda:

  • Introduction to Application Lifecycle Management with Visual Studio 2010
  • Advanced Version Control with Team Foundation Server 2010
  • Testing in Visual Studio 2010
  • Architecture in Visual Studio 2010
  • Applying Scrum with Team Foundation Server 2010

On December 22 I will deliver the Introduction part for a Queaso Get Together in Gent. Feel free to contact me if you want to schedule a session for your company / user group! Always fun to do!

The Introduction slides are also added to the download section.

I also make use of this post to show you the updated VS2010 Stadium Diagram, the new Big Picture (at this moment still without the Teamprise plugin).

So, no sign anymore of Team System editions, the introduction of the Test Elements SKU with Microsoft Test & Lab Manager (MTLM), some new features for TFS2010 (Requirements Management & Test Case Management) and the addition of Lab Management. Excellent offering!


Deleted Team Projects still visible in Source Control Explorer

November 25, 2009

Today I bumped into a solution for deleting deleted Team Projects (yip, that’s right: deleting Team Projects that should have been already deleted). A while ago we noticed that Team Projects in TFS2008 SP1 that were deleted with TFSDeleteProject.exe were still visible in the Source Control Explorer and re-running TFSDeleteProject.exe for the same Team Projects resulted in an error message that the Team Project could not be found on the Team Foundation Server.

But due to this entry in the TFS forum I was finally able to remove the Team Projects from Source Control Explorer as well.

Solution:

  • Create new Team Project with exactly the same name as the Team Project that wasn’t completely deleted and specify the option to not create the version control folder.
  • After the Team Project Creation wizard finishes, you need to run TFSDeleteProject.exe for the newly created Team Project.

No sign anymore of the deleted Team Projects in Version Control! Sounds logical?!


ALM / TFS Books and Documentation

November 12, 2009

This week at TechEd in Berlin, Hans asked for some interesting ALM / TFS books. This is a quick random list of the latest books I know about:

Feel free to add some more books to the list!

Note that there is also a paperback version available of the TFS Guide: Team Development with Visual Studio Team Foundation Server, written by Microsoft Patterns & Practices. The online version can be found at CodePlex: TFS Guide.

If you are looking for the online MSDN documentation, point your favorite browser to the Team Foundation Server Developer Center.

There will also come some new books on VS2010: Professional Visual Studio 2010 Team System: with Team Foundation Server 2010, but I think that the name of the book will still change. Martin Woodward also mentioned that he’s writing on a new Team Build book for VS2010 and I’m sure that there are others under construction. To be continued!


TFS2010: Visualization of merging partial changes in changeset

November 11, 2009

Yesterday (during the Source Code Management session of Brian Harry at TechEd 2009 in Berlin), I noticed for the first time that merging partial changes in a changeset is also clearly visible afterwards. I just found some time between sessions to test it out …

In the screenshot above you may notice that changeset 9 (dev branch) is merged to the main branch. But look at the yellow color of the bar after the merge and the tooltip that is shown when I hover over changeset 11. Changeset 9 consisted of 2 different files that were modified while the merge operation took only 1 modified file in changeset 11. Valuable information!


Branching in TFS2010: atomic operation without pending changes

November 10, 2009

Currently in TFS2008 when you create a new branch in your version control structure, all files are copied to your local worspace and marked as pending changes. This means that a branch in TFS2008 is not seen as an atomic operation. You were required to check-in the local changes before the branch got created on the server. If your branch would consist of a huge set of files, branching could become a time-consuming operation and the system would not prohibit you to do some modifications to the pending changes.

In TFS2010, a branch is now seen as an atomic operation: it doesn’t copy all files into your local workspace and the branch action is immediately checked-in – no option anymore to do some local modifications. The child branch will always be an exact copy of the selected parent branch folder. You will get a messagebox that will notify you of this action when you hit the branch button …

You will need to request a get latest on the newly created child branch to have a local copy of the sources.

Some simple changes can make a big difference!