March 2010 - Posts
Quality Center 2 TFS 2010 Migration In 3 Hours
Couple of months ago I’ve published about Quality Center 2 TFS 2010 migration tool (Quality Center Migration To Team System 2010 – Done),
I’m glad to announce that we had a very good experience with our Beta customer and now this tool is operational and will be available for Sela Customers.
If you want to migrate all Quality Center data to Team System and afraid to lose time and data this is the right solution for you.
For any questions please free to contact me.
Beta Customer Statistics:
8500 Item
· 1500 Requirements
· 6000 Bugs
· 1000 Test Cases
All In 3 Hours







My Developer Academy 4 Session
After a long and exciting day Developer Academy 4 is Over and I can come back to write posts. :-D
Yesterday I had two lecture, this first one on TDM (R&D Managers) called “The Rise of Testing” on CodedUI Testing and Intel Success story.
The Second one was “Introduction To CodedUI Testing and Microsoft Test Manager“, you can download the presentation from Download Presentations or see the video Developer Academy 4 Videos.
The Demos will be available in Developer Academy 4 site so I’ll keep you informed.
If you interesting in CodedUI Testing you can see more information here - Coded UI Test or contact me directly from additional questions.
One last thing to know about TDM Track: All the presenters use my “Custom Presentation Remote Control” (See Picture) and it works great!!!
If you want to build one on your own - How To Build PowerPoint Presentation Remote Control
Build Your First Windows Phone 7 Silverlight Application - Part 2
In the last post Build Your First Windows Phone 7 Silverlight Application - Part 1 I show how to create new Windows Phone 7 Application project and we wrote some code to change Color Background.
In this post I’ll show how to work with Windows Phone 7 Emulator to test your application.
Run Windows Phone 7 Emulator
In Visual Studio 2010 you will notice that you have a combobox to select the desire Device, unless you have a Windows Phone 7 device you need to select “Windows Phone 7 Emulator”
The first time can take couple of seconds and you will see the Emulator loading, you only need to do this Once, after the emulator loaded for the first time there is not need to close him even for debugging.
If you press F5 you automatically get your application on the screen, if not you can use Home and Back button in the bottom of the emulator to get to the home page.
Once you in the Home Page click the Right Arrow and than click on your application.
Now Color Application should be up, pick a color, grid and click “Change”.
Enjoy
Build Your First Windows Mobile 7 Silverlight Application
- Part 1
I’ll get easy on the first time so I’ll just show you how to build a simple Color Picker application that will change the Phone Background Color, and one important detail – You Don't Need Windows Phone Device, the dev tool comes with Emulator.
The Emulator is actually the full WP7 OS running on your PC, So you’ll get awesome debug features.
The Emulator will also support multi-touch directly on the PC if the developer is using a multi-touch enabled PC/screen.
So let’s get started…
After the installation is done you’ll notice Visual Studio 2010 Express for Windows Phone available under “Microsoft XNA Game Studio 4.0” folder.
But if you have Visual Studio 2010 (any version) it will also be available there.
Create Windows Phone Application
Open Visual Studio 2010 and you’ll notice there is new category “SilverLight for Windows Phone”.
Pick “Windows Phone Application” and create the project.
Create UI
Open Toolbox and drag the following controls:
1. Button – change the content property to “Change”
2. Three RadioButtons – 1. Content = “Layout” 2. Content=”Content” 3. Content =”All”
3. Listbox
Nice thing you’ll notice is the Style of all controls is based on Windows Phone 7 Styles (Placed in App.Xaml)
Add Code Behind
Create new method for getting all Colors.
IEnumerable EnumerateColors()
{
foreach (var color in typeof(Colors).GetProperties())
yield return new KeyValuePair<string, Color>(color.Name,
(Color)color.GetValue(null, null));
}
Than create ContentGrid load event and add the following:
private void ContentGrid_Loaded(object sender, RoutedEventArgs e)
{
list_colors.ItemsSource = EnumerateColors();
}
Change Button Click
if (list_colors.SelectedItem != null)
{
var item = (KeyValuePair<string, Color>)list_colors.SelectedItem;
SolidColorBrush color = new SolidColorBrush(item.Value);
if (rad_ContentGrid.IsChecked == true)
this.ContentGrid.Background = color;
else if (rad_layout.IsChecked == true)
this.LayoutRoot.Background = color;
else
this.LayoutRoot.Background = this.ContentGrid.Background = color;
}
Create StaticResource for Color ListBox
Add the following inside the Grid element.
<Grid.Resources>
<DataTemplate x:Key="ColorItemTemplate">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Path=Key}" Foreground="{Binding Path=Key}" />
</StackPanel>
</DataTemplate>
</Grid.Resources>
Edit the ListBox and add ItemTemplate property for ColorItemTemplate
<ListBox Height="477" ItemTemplate="{StaticResource ColorItemTemplate}" HorizontalAlignment="Left" Margin="20,149,0,0" Name="list_colors" VerticalAlignment="Top" Width="446" BorderBrush="#FFEB1212" BorderThickness="1" SelectionMode="Single" />
And one last thing, Change Application Name and Page Name
Full Code Behind:
public MainPage()
{
InitializeComponent();
SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;
}
private void ContentGrid_Loaded(object sender, RoutedEventArgs e)
{
list_colors.ItemsSource = EnumerateColors();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
if (list_colors.SelectedItem != null)
{
var item = (KeyValuePair<string, Color>)list_colors.SelectedItem;
SolidColorBrush color = new SolidColorBrush(item.Value);
if (rad_ContentGrid.IsChecked == true)
this.ContentGrid.Background = color;
else if (rad_layout.IsChecked == true)
this.LayoutRoot.Background = color;
else
this.LayoutRoot.Background = this.ContentGrid.Background = color;
}
}
IEnumerable EnumerateColors()
{
foreach (var color in typeof(Colors).GetProperties())
yield return new KeyValuePair<string, Color>(color.Name,
(Color)color.GetValue(null, null));
}
Full Xaml:
<phoneNavigation:PhoneApplicationPage
x:Class="DemoHelloWorldApplication.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phoneNavigation="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Navigation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
>
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.Resources>
<DataTemplate x:Key="ColorItemTemplate">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Path=Key}" Foreground="{Binding Path=Key}" />
</StackPanel>
</DataTemplate>
</Grid.Resources>
<!--TitleGrid is the name of the application and page title-->
<Grid x:Name="TitleGrid" Grid.Row="0">
<TextBlock Text="Hello World Application - Shai Raiten" x:Name="textBlockPageTitle" Style="{StaticResource PhoneTextPageTitle1Style}"/>
<TextBlock Text="Colors..." x:Name="textBlockListTitle" Style="{StaticResource PhoneTextPageTitle2Style}"/>
</Grid>
<!--ContentGrid is empty. Place new content here-->
<Grid x:Name="ContentGrid" Grid.Row="1" Loaded="ContentGrid_Loaded">
<Button Content="Change" Height="70" HorizontalAlignment="Left" Margin="306,19,0,0" Name="btn_start" VerticalAlignment="Top" Width="160" Click="button1_Click" />
<ListBox Height="477" ItemTemplate="{StaticResource ColorItemTemplate}" HorizontalAlignment="Left" Margin="20,149,0,0" Name="list_colors" VerticalAlignment="Top" Width="446" BorderBrush="#FFEB1212" BorderThickness="1" SelectionMode="Single" />
<TextBlock Height="39" HorizontalAlignment="Left" Margin="20,42,0,0" Name="textBlock1" Text="Pick Color" VerticalAlignment="Top" Width="123" />
<RadioButton Content="Layout" Height="40" HorizontalAlignment="Left" Margin="20,87,0,0" Name="rad_layout" VerticalAlignment="Top" IsChecked="True" />
<RadioButton Content="Content" Height="40" HorizontalAlignment="Left" Margin="160,87,0,0" Name="rad_ContentGrid" VerticalAlignment="Top" />
<RadioButton Content="All" Height="40" HorizontalAlignment="Left" Margin="320,87,0,0" Name="rad_all" VerticalAlignment="Top" Width="160" />
</Grid>
</Grid>
</phoneNavigation:PhoneApplicationPage>
DevAcademy4 - Be The First To Know - Introduction To CodedUI Testing and Microsoft Test Manager
As you know Developer Academy 4 is coming and it’s going to be Awesome!
My presentation will going to be about Coded UI Automation Testing, the Future of Automation Testing!
In this lecture I’ll start from the beginning to advanced stuff that will help you and your organization increasing Testing Quality and Save a Lot of Time and Money using simple and advanced automation testing.
I’ll see you there!
MIX10 - Internet Explorer 9 Preview Available And Support Microsoft HTML5
Microsoft's second day of MIX10 has seen the launch of the Internet Explorer 9 Platform Preview,
its first readily available version of the next-generation browser - Download Internet Explorer 9 Preview
The preview brings the new JavaScript engine, nicknamed "Chakra" It claims the title of the first multi-core aware JavaScript renderer and can use one core to render just the web scripts while the rest of the system can devote its attention to the main page.
Early testing puts IE9 ahead of pre-release Firefox 3.7 builds but just behind Safari 4.
It’s Really Amazing! you can see for you self, just open couple of the demos(below) in different types of browsers and take a glimpse for the future.
Internet Explorer 9 Demos

Enjoy
Team System 2005 Service Pack 1 Forward Compatibility is now available!
This is an update for the 2005 SP1 version of Visual Studio Team System Team Explorer and allows the 2005 SP1 version to work with the Team Foundation Server 2010.
The update will allow teams to move forward and use the Team Foundation Server 2010 server even if part of the team continues to use the Team Explorer 2005 SP1 client.
IMPORTANT
The Visual Studio 2005 SP1 is a required prerequisite to install this update. If you plan on using TFS Office Integration with in a side by side configuration with Visual Studio 2010, you will need to install the side-by-side Hotfix KB946075.
Visual Studio Team System 2005 Service Pack 1 Forward Compatibility
Visual Studio Team System 2008 Service Pack 1 Forward Compatibility
Enjoy
MIX10 - Windows Phone Developer Tools Available Now For Download
Just announced that Windows Mobile 7 developer platform is available for Download Now, and it’s free and will stay free!
The Windows Phone Developer Tools CTP includes the following
- Visual Studio 2010 Express for Windows Phone CTP
- Windows Phone Emulator CTP
- Silverlight for Windows Phone CTP
- XNA 4.0 Game Studio CTP
Later on I’ll post on how to build you first Windows Mobile 7 application using Visual Studio 2010 and Expression Blend 4.
Windows 7 Mobile Site
Enjoy.
MIX10 - Silverlight Media Framework – Smooth Streaming - CodePlex
I just informed that all Olympic Games where broadcast using SilverLight Player on IIS Smooth Streaming.
The SMF builds on the core functionality of the Smooth Streaming Player Development Kit.
What is the Microsoft Silverlight Media Framework?
Microsoft's open source Silverlight Media Framework (SMF) enables developers to quickly deploy a robust, scalable, customizable media player for IIS Smooth Streaming delivery. The SMF builds on the core functionality of the Smooth Streaming Player Development Kit.
SMF is built on a proven code base with dozens of leading Smooth Streaming deployments, including Wimbledon, Sunday Night Football on NBCSports, the UEFA Super Cup on Canal+, Roland Garros and the Tour de France on France Télévisions and many others and by providing developers with source code they can more easily build these experiences for their deployments. Key features in the framework include DVR, rewind, alternate language tracks, in-stream data feeds and analytics tracking. The SMF is designed for future third-party extensibility and component modularity, as well as support for other media delivery scenarios beyond Smooth Streaming. The Player is available on CodePlex

Player Elements
- Play / pause
- Rewind
- Fast forward
- Replay
- Slow motion
- Next chapter marker
- Previous chapter marker
- Timeline Scrubber
- Current position / total position
- Go to live
- Bitrate meter
- Volume
- Full screen / restore
How To Build PowerPoint Presentation Remote Control
As you know Developer Academy 4 is just around the corner, I have two lectures the first one is
Each presenter needs to move slides back and forward without going to the computer each time, to perform this magic actions you need a PowerPoint Presentation Remote Control.
So I spent couple of hours to build one and now I’ll show how:
Part 1: Get the necessary parts
1 – Wireless Keyboard
1 – Video Camera Battery Pack
6 – Wires
1 – Battery carriage
2 – Buttons
1 - Soldering iron + tin

Part 2: Take what’s matters
How to get started? take a screwdriver and start removing all screw from the back side of the Keyboard.
After you removed all the plastics and aluminum you will see electronic boards.
The only board you need is the one marked with Green.
Safely remove the Keyboard controller from the Keyboard surface and disconnect all cables.
Part 3: Find the right dots
Take the Keyboard matrix and find the right dot for Enter key and Backspace key.
How? hold the matrix and keyboard together and press Enter and feel where is the right dot.
You will notice there is a shared dot for Enter and Backspace, the easy is to paint a line from each dot.
After you find the right dots take the Keyboard controller and rub the carbon until you see copper wire.
Using tin, Solder the wires to the dots you found.
Connect the wires to the designated buttons and create a share bridge for the shared dot.
Part 4 – Where is the Power?
Connect Battery carriage to the Keyboard controller power supply.
Enter the Battery carriage and Keyboard Controller to the Video Camera Battery Pack and close it.
Part 5 – Check It
Plugged in the USB receiver (comes with Wireless Keyboards) and click the buttons.
Enjoy
TFS API Part 24 – Get All Fields From TFS
I got an email regarding previous post (TFS API Part 6: WorkItemStore - Get Fields From WorkItemType) how to get Fields without regard to Work Item Type?
This is very easy using Team System API.
Download Demo Project
Step 1: Create Project and Add Reference
Create an WPF/WinForm application and add the following references:
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
(C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.WorkItemTracking.Client.dll)
Microsoft.TeamFoundation.Client.dll
(C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll)
Step 2: Connect to Team Foundation Server
To perform this action all you need to do is implement WorkItemStore object.
TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.NoProject, false);
tpp.ShowDialog();
if (tpp.SelectedTeamProjectCollection != null)
{
TfsTeamProjectCollection tfs = tpp.SelectedTeamProjectCollection;
WorkItemStore store = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
//Store object contains all fields, no just for spesific work item type
AddFields(store.FieldDefinitions);
}
Step 3: Get Fields from Server
void AddFields(FieldDefinitionCollection fields)
{
foreach (FieldDefinition field in fields)
{
listBox1.Items.Add(new FieldItem(field));
}
}
public class FieldItem
{
public FieldType FieldType { get; set; }
public int ID { get; set; }
public string Name { get; set; }
public string ReferenceName { get; set; }
public string HelpText { get; set; }
public ReportingAttributes ReportingAttributes { get; set; }
public FieldUsages FieldUsages { get; set; }
public bool IsEditable { get; set; }
public AllowedValuesCollection AllowedValuesCollection { get; set; }
public FieldItem(FieldDefinition field)
{
this.ID = field.Id;
this.Name = field.Name;
this.FieldType = field.FieldType;
this.ReferenceName = field.ReferenceName;
this.ReportingAttributes = field.ReportingAttributes;//TFS 2010
this.FieldUsages = field.Usage; //TFS 2010
this.IsEditable = field.IsEditable;
this.AllowedValuesCollection = field.AllowedValues;
}
public override string ToString()
{
return string.Format("{0} ({1})", this.Name, this.ReferenceName);
}
}
Download Demo Project
Enjoy
TFS API Part 23 – Create Global List (Xml Way)
Download Demo Project
Step 1: Create Project and Add Reference
Create an WPF/WinForm application and add the following references:
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
(C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.WorkItemTracking.Client.dll)
Microsoft.TeamFoundation.Client.dll
(C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll)
Step 2: Connect to Team Foundation Server
TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.NoProject, false);
tpp.ShowDialog();
if (tpp.SelectedTeamProjectCollection != null)
{
gl_group.IsEnabled = true;
TfsTeamProjectCollection tfs = tpp.SelectedTeamProjectCollection;
tfs.EnsureAuthenticated();
this.store = (WorkItemStore)tfs.GetService(typeof (WorkItemStore));
}
Step 3: Create GlobalList class
There is two ways for creating a GlobalList using TFS API,
1. String list looks like that: (you need to add header manually)
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 1' />");
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 2' />");
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 3' />");
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 4' />");
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 5' />");
//builder.AppendLine("<LISTITEM value='Lorem Ipsum 6' />");
2. Xml Document (I used this option), this will allow you more easily to add quotes and couple more char that can be difficult to add in string format.
public GlobalList(string listname,WorkItemStore store)
{
doc = new XmlDocument();
CreateGlobalListHeaders(listname);
this.store = store;
}
To make sure there is not encoding problem add ProcessingInstruction to the xml document.
private void CreateGlobalListHeaders(string listname)
{
//Define encoding for non english languages
XmlProcessingInstruction newPI;
newPI = doc.CreateProcessingInstruction(ProcessingInstructionTarget, ProcessingInstructionData);
doc.AppendChild(newPI);
XmlElement GlobalRoot = (XmlElement)doc.CreateElement("gl", "GLOBALLISTS",
"http://schemas.microsoft.com/VisualStudio/2005/workitemtracking/globallists");
ValueList = (XmlElement)doc.CreateElement("GLOBALLIST");
//Set global list name
ValueList.SetAttribute("name", listname);
doc.AppendChild(GlobalRoot);
GlobalRoot.AppendChild(ValueList);
}
After you finish adding the values you will use WorkItemStore object to import the GlobalList
public bool Save()
{
try
{
store.ImportGlobalLists(doc.InnerXml);
return true;
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
Download Demo Project
Full GlobalList Class Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
namespace TFSAPI_GlobalList
{
public class GlobalList
{
private XmlDocument doc;
private XmlElement ValueList;
private WorkItemStore store;
private const string ProcessingInstructionData = "version='1.0' encoding='utf-8'";
private const string ProcessingInstructionTarget = "xml";
public GlobalList(string listname, WorkItemStore store)
{
doc = new XmlDocument();
CreateGlobalListHeaders(listname);
this.store = store;
}
public void AddValue(string value)
{
XmlElement Item = (XmlElement)doc.CreateElement("LISTITEM");
Item.SetAttribute("value", value);
ValueList.AppendChild(Item);
}
public bool Save()
{
try
{
store.ImportGlobalLists(doc.InnerXml);
return true;
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
private void CreateGlobalListHeaders(string listname)
{
//Define encoding for non english languages
XmlProcessingInstruction newPI;
newPI = doc.CreateProcessingInstruction(ProcessingInstructionTarget, ProcessingInstructionData);
doc.AppendChild(newPI);
XmlElement GlobalRoot = (XmlElement)doc.CreateElement("gl", "GLOBALLISTS",
"http://schemas.microsoft.com/VisualStudio/2005/workitemtracking/globallists");
ValueList = (XmlElement)doc.CreateElement("GLOBALLIST");
//Set global list name
ValueList.SetAttribute("name", listname);
doc.AppendChild(GlobalRoot);
GlobalRoot.AppendChild(ValueList);
}
}
}
Enjoy
Visual Studio 2010 Test Package for Mozilla Firefox
As you know Visual Studio 2010 Coded UI Test will not support Firefox recording, but is now supporting Firefox Playback.
Coded UI Test will not recognize Firefox objects, many customer needs the ability to run automation on Firefox browser, for that reason Microsoft just released a “Power Tool” just for that (Mozilla Firefox 3.5 and above).
“Visual Studio Test Package for Mozilla Firefox” which can be downloaded from here.
After you download the installation proceed with the instructions until this setup ends.
After the setup ends run the extension installation tool ( %CommonProgramFiles%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages\ConfigFFExtension.exe )
Now when you start Firefox in the first time you will see Visual Studio Test Helper plug installed.
Microsoft Test Manager – Running Test
If have create a simple Test Case for Bing.com search test.
Run Test Case and make sure to check “Create action recording” – The First Run need to be recorded against Internet Explorer and not Firefox,
after you finish the first run you will notice Orange color beside the steps indicate about Automation available for those steps.
Now before you start the second iteration open “Run” combo and click “Change Browser For Playback”, this will open a new window that allows you to select the desire Browser for playback, select Firefox 3.5 and click “Save”.
Click “Play all”, and you will notice the Playback is running on Firefox 3.5.
Enjoy.
VS 2010 RC Intellisense Crash Issue – Registry Patch
In my previous post VS 2010 RC Intellisense Crash Issue – Patch there is a patch that you can download to fix Crashing issue with Visual Studio 2010 RC, this patch didn’t works for me.
Another workaround to solve this issue is not a pretty one, but it works!
Open RegEdit and map to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\General
and add a new DWORD called “EnableUnhandledExceptionDisplay” with value “1”.
After this you will get a warning message (just once) and this really solving this problem.
