Sunday, 28 July 2013

TFS 2012 - Scheduling Backups

It is very easy to create scheduled backups for TFS 2012, when you have TFS power tools installed ( Following is a step by step guide on, how to create a scheduled backup for TFS 2012.

1.  Open the TFS Admin Console -- > Scheduled Backups


2.  Provide a network location to backup files. Set the retention period for backups. Retention period specifies the number of days to keep the backups, before deleting the older backups to free disk space, for new backups

3. Select the TFS report server databases

4. It is important to create or use the existing encryption key.  this will be mandatory to restore reporting services.

5. Select the SharePoint databases 

6.  In this step you can setup email alerts for backup job failure & success.

7. Schedule the backups, how to set custom schedule example below.

8. Review the settings

9. Verify settings

10. Configure 

11. Great now all is set, and the schedule backup will run on the defined schedule.

12. You can even trigger backup manually to verify. By clicking on Take Full Backup Now.

 13. The backup files are copied to the network location.

It is recommended to copy these files to a may be tape drive occasionally to keep a backup of the backup.

Monday, 22 July 2013

MTM - Enable Screen Capture for Testing

There is build in screen capture capability coming with MTM/VS 2012. It is another cool feature giving great input for the developers when they try to reproduce the bugs. Simply you do not have to complain as developers, that I cannot reproduce in my machine, because I am not sure what the QA has done. Now you can see each of the actions QA performed for testing.

Lets look at how to enable the screen capturing in MTM (Microsoft Test Manager).

First you have to open MTM and connect to a test plan.

Then go to plan properties and create new test settings or you can modify an existing setting

Give a name to settings

Set roles

Go to Data and Diagnostics and enable Screen and Voice Recording

You can set additional options by  clicking on configure

That it and you are done.

Now when you run tests with the test plan screen recording will start automatically.

When you create a bug it captured video will be added to the bug, and the action recording will give more info. as well.

The Bug now has a link to the captured video of the test actions performed.

You can play the video in a media player.

Thursday, 11 July 2013

MSF Agile - Bug WIT - Adding to Backlog with State New

We do not get Bug work item in Backlog for MSF Agile process template. But it is a good idea to have it on the backlog, since the team then will know there are more work to be done. With VS Scrum template we have this as default option.

If we only add the Bug work item to the Backlog, again it becomes a bit of a issue. Why? Because in MSF agile template the initial State of Bug work item is Active. So there will be lot of Active bugs in the board and unassigned..looks bad..isn't it?
What if we introduce a new State to Bug, as "New", and make the Bug to have New, Active, Resolve, Close (4 States) rather than having Active, Resolve, Close (3 States).

OK, lets do it step by step for a team project and see how it goes.

1. First we have to have TFS power tools for VS 2012 update 2 installed to get the customizations done.

2. Export Bug Work item as below.


2. Open Bug work item template.

3. Choose file saved in step 1

4. In power tools process template editor you can do the modification to add new state for the Bug work item workflow easily using the GUI.

a) Bug work item state transition  - MSF Agile default

b) Add new State "New"
c) Easy to modify in GUI

d) But easier to open the Bug.xml file in notepad and edit as per below.

  •      Add new State "New"

  • Remove "" to Active Transition and add the Transitions as below

e) When above changes done, save it as BugModified.xml. Open it in Process template editor, and you should see the new state transition workflow like this.

 f) Now import the  BugModified.xml to the team project using power tools. (Process Editor --> Work Item Types -- > Import WIT)

h) Make sure to add verify fields "Story Points" (Size of Bug - Similar to User Story Size) and "Stack Rank" (to prioritize the backlog items) available in the bug WIT. If not available add them.

 5. Now the Bug work item has new State "New"

6. Now we have to do some modifications to categories, and common config to get the Bug into backlog and to meke sure drag and drops work in Board.

7. Open command prompt in TFS server and  change directory (to use witadmin) using

cd C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

8. Execute below command with correct collection and team project name

witadmin exportcategories /collection:http://localhost:8080/tfs/defaultcollection /p:Demo.MSFAgileModified /f:"C:\temp\Categories.xml"

9. Open Categories.xml notepad and add the text in green box in the Requirement Category and save the as CategoriesModified.xml

 10. Execute below command to get CommonProcessConfig.xml

witadmin exportcommonprocessconfig /collection:http://localhost:8080/tfs/defaultcollection /p:Demo.MSFAgileModified /f:"C:\temp\CommonProcessConfig.xml"

Change as below (add green box text to bug category) and save the file as CommonProcessConfigModified.xml

11. Now import the two modified xmls using below two commands

witadmin importcategories /collection:http://localhost:8080/tfs/defaultcollection /p:Demo.MSFAgileModified /f:"C:\temp\CategoriesModified.xml"

witadmin importcommonprocessconfig /collection:http://localhost:8080/tfs/defaultcollection /p:Demo.MSFAgileModified /f:"C:\temp\CommonProcessConfigModified.xml"

12. Check the backlog and all now the bugs appear in the backlog

13. When click on board .. err.. :(

14. Before our imports Column Options in the Board looked like

 15. But now

 16. The fix

 17. Great.. the Board is back in operation

18. State transition with drag drop works fine...

If this was done on TFS 2013 preview... Bug would have a different color theme as well..