Category Archives: ALM

Options for Copying Test Cases in TFS

I recently had a customer ask if they could “copy” test cases in Microsoft Test Manager. As with many questions, the answer is the all too fearsome, “it depends” and more context is needed to properly answer the question. In this post, I thought I’d try to describe the options for “copying” test cases and provide some sample use cases.

Re-using a test case

Within a test plan, you can place the same test case in multiple test suites. These “copies” are the same test case and any changes you make to this test case will be evident no matter which test suite you open or run it from.

Copying a test case – This is also known as a “shallow copy”

You can copy test cases from one test plan to another. When copying test cases, you create a copy of all test cases in one test suite and add them to another test suite. As with the above option, these are really the same test cases, so any change you make to one, you will make to the other. The attributes and test steps are all “shared”, however test results are not.

Note that the source and destination test suites are independent of each other. You can add or remove test cases from either of them without affecting the other.

How-To:

  1. From the Plan tab, select a static test suite that will hold the new copy.
  2. In the toolbar, click the button Create test suites by referencing existing test cases.
  3. In the dialog window, select the test plan and test suite that you want to copy, and click Create suite.

Use Case:

  • When you are beginning a new iteration or project, you may want re-use existing test cases from previous efforts.

Cloning a test case – This is sometimes known as a “deep copy”

You can clone test cases to create an independent copy of an existing test case. After cloning, you can make changes to either the original or cloned test case without affecting the other.

Note that cloning can be used across Team Projects, but not across Team Project Collections.

Note that this creates a whole new test plan.

How-To:

  1. From the Organize tab, select a test plan.
  2. In the toolbar, click the button labeled Clone.
  3. In the dialog window, select one or more test suites from the drop down list that you want to clone.
  4. (Optional) Check the box labeled Clone requirements to also “deep copy” any requirements associated with the selected test suite(s).
  5. On the right side of the dialog, enter the name of the destination test plan, and set the associated area path and iteration path.
  6. Click the Clone button.
  7. The Clone log appears. Pay close attention to the status of each cloning operation as it may take a few moments to complete.

OR

  1. Open a command prompt.
  2. Type cd %VS110COMNTOOLS%..\IDE to navigate to the necessary directory
  3. Type tcm suites /clone /collection:http://YourServer:8080/tfs/YourCollection /teamproject:”YourSourceProject” /destinationTeamProject:”YourDestinationProject” /suiteid:YourSourceSuite /destinationsuiteid:YourDestinationSuite /clonerequirements /overridefield:”YourField“=”YourValue
    1. YouServer– the name of your Team Foundation Server
    2. YourCollection– the name of your Team Project Collection
    3. YourSourceProject– the name of the Team Project you want to clone from
    4. YourDestinationProject – the name of the Team Project you want to clone to; this is an optional parameter and you do not need to use it if you are cloning within the same Team Project
    5. YourSourceSuite – the ID of the test suite to be cloned; the ID is displayed in the details pane when you select it in the test plan; retrieve a list of suites by using tcm /suites /list; nested test suites will be cloned as well
    6. YourDestinationSuite – the ID of the test suite you want to clone to
    7. *clonerequirements – this is an optional parameter and you use it if you want to clone the requirement work items used by requirements-based suites; if this parameter is not specified, requirements-based suites will be converted to static suites
    8. *overridefield – this is an optional parameter and you use it if you want to set a particular field in the new test cases

Use Case:

  • Clone test cases when you want to use the same test case against two releases simultaneously. This way you can edit the test case for one release without interfering with the efforts in the other release.

Use a test case as a template to create a new test case

You can use an existing test case to create a new test case with all of the same values.

How-To:

  1. From the Plan tab, right-click a test case, and select Create copy and add to suite.

Use Case:

  • When you have a number of test case properties (e.g. iteration path, area path, priority, etc.) that will have the same values in your new test case, you can use an existing test case as the starting point.
  • Similarly, when you have a complicated or lengthy number of test steps in an existing test case that will be repeated in a new test case. (You should also consider Shared Steps in this use case.)

There’s a growing number of Microsoft Test Manager/TFS users out there, so I hope this helps you.

Visual Studio 2013 Preview Event

I just wanted to thank my co-presenter, Chris Kadel, and everyone who attended the event in St. Louis. (We had a broad range of new features to present on and there just never seems to be enough time to get to everything.)

I didn’t have any slides, but Chris did and you can find those here.

For those that weren’t able to attend, here’s a breakdown of features we covered:

  • Managing SCRUM of SCRUMs (agile portfolio management)
  • Improved offline version control option with Git
  • New collaboration options (Team Rooms and web-based code commenting)
  • IDE enhancements to improve productivity
  • New insights into code (CodeLens)
  • Simplifying performance analysis (Performance & Diagnostics Hub)
  • New performance tools (Energy Consumption & UI Responsiveness)
  • Productivity for C++ developers w/ new language/tooling support
  • “De-fragging” ASP.NET
  • Cloud-based load testing
  • Simplified Team Build
  • Integrated release management (InRelease)
  • New ways to reproduce production issues (new version of IntelliTrace collector and memory dump analysis)

Look forward to future events around Visual Studio and TFS 2013. I’ve seen a glimpse of other features that may be included for RTM/Update 1 and I think you will love it!

TFS 2012 Fun!

http://www.youtube.com/watch?v=p9TDkP4xGpU

This is a fun video. The lyrics are really funny!

Tagging TFS Work Items

Several people have asked for the ability to assign tags to work items in Team Foundation Server. Work items have always had an Area Path attribute that provides a hierarchical categorization to work items that is great for reporting, but sometime you want something a little more freeform. I’m happy to let all of you know that with Team Foundation Server Update 2 (currently in “go-live” CTP), we now provide tagging. (Download CTP 4 here.)

NOTE: Work item tagging is already available in Team Foundation Service (our cloud-hosted TFS).

In the screenshot below, you can see the Tags label right above the title of the bug.

image

Clicking the Add… button changes it into a text box where you can enter some relevant text.

image

You can add several more tags and remove any of them by clicking the small ‘x’ next to the associated text. Be sure to save your changes.

Run a query and you’ll see a small filter icon on the far right of the query toolbar. Click this icon to display the Tags filter. From here, you can see a count of work items with the specified tags. You can click a tag in order to further filter the queried results. Click the All tag to remove any filtering.

image

In the screenshot above, you can see I also display the Tags column. You can add this column to your query by clicking the Column Options button in the query toolbar.

For you advanced TFS users, the System.Tags field type is Plain Text and not reportable.

I can think of a variety of scenarios where tags could be used. Where would you use this feature?

Who’s in My TFS?

I had a customer recently ask how to generate a list of TFS users. What constitutes a TFS user may differ from person to person, but there are ways to do this. For this brief post, I want to describe one of these.

TFS administrators can use the TFSConfig tool to query and modify various aspects of their Team Foundation Server instance. The TFSConfig tool is, by default, located in C:\Program Files\Microsoft Team Foundation Server 11.0\Tools. Learn more about TFSConfig here.

Team Foundation Server 2010 introduced a new Identities command. Unfortunately, you need some pretty beefy creds to run this command. You must be in the Team Foundation Administrators group and sysadmin on the data tier! Here is the output if you run this command within the Brian Keller TFS virtual machine (found here).

image

Learn more about the Identities command here.

NOTE: In TFS 2005 and TFS 2008, you could use the TfsConfig Sid command for similar results.

TFS for Java Developers

I occasionally get asked about support for Java developers so I put together this list to compare the features between Team Explorer on Visual Studio and Team Explorer Everywhere on Eclipse.

Team Explorer 2012 Team Explorer Everywhere 2012
Switch Team Project contexts Yes Yes
Pending Changes hub Yes Yes
Source Control Explorer Yes Yes
Work Items hub Yes Yes
Builds hub (create, modify, delete) Yes Yes
Web Access hyperlink Yes Yes
Settings hyperlink Yes Yes
Local workspaces Yes Yes
Embedded work item editor Yes Yes
Transparent execute bit support No Yes
Access to Team Foundation Service Yes Yes
My Work Yes No
Code Review Yes No
Suspend and Resume Yes No

Read more about it: What’s New in Team Explorer Everywhere.

Learning about new shapes isn’t just for your kids

Mitt Romney may think learning about new shapes is silly, but the Visual Studio team doesn’t. If you don’t know, the new storyboarding feature is essentially a plug-in to PowerPoint that allows a user to quickly draw up user interfaces. Right from PowerPoint, a user can associate these storyboards with one or more work items in TFS and collaborate across the team.

The plug-in provides a number of built-in shapes for developing desktop apps, web apps, Windows 8 apps, Windows Phone apps, and some collaboration shapes. Combined with the built-in PowerPoint shapes, drawing, and animation tools; you’ve already got the ability to draw up the most common user interfaces. You can even create, save, and share your own shapes specific to your applications.

But wait, there’s more! Act now and you can get several more shape libraries from Microsoft and others. This page lists several storyboard shape libraries that you can easily import into your shapes library. Most recently, Microsoft released shapes and icons for the iOS. Now you can sketch out the desired UI before you have to fumble through Xcode and Objective-C! Winking smile

New Team Foundation Service Announcement

Brian Harry had an exciting blog post today I wanted to make sure people were aware of:

Introducing Kanban – I’m really not very well-versed on Kanban, but a lot of it seems like common sense practices you could use with any process. At the bottom of Brian’s post, there’s a Channel 9 video that shows the new feature and also introduces you to Kanban. Pay special attention if you are using the Team Foundation Service preview because you’ll automatically get the new Kanban board and Cumulative Flow diagram.

Microsoft is Top Pick for ALM

Investigating the market for a new software product can be a daunting task. Sometimes it’s difficult to even uncover all of the players. There’s no shortage of rhetoric on each vendor’s web site, but how can today’s CTO get objective information about how a software package ranks against it’s peers in a given space? Every year, Gartner releases what they call a Magic Quadrant report evaluating various products in a given space.

This past week, Gartner released their analysis of products in the Application Lifecycle Management (ALM) arena. It is very exciting to see us in the top spot as a thought leader and for our ability to execute. If you are interested in ALM, you can read through an entire reprint of the report here. There’s plenty of new competitors listed and some of the existing competitors have shifted quite a bit.

And this comes prior to the release of Team Foundation Server 2012! I suppose with all of the new features in 2012, they could just add another square to the upper-right. It’s beyond awesome! It’s be-awesome!

Peer Code Review with Team Foundation Server 11 – Part 5

Back to Part 4

Action: Requester Closes the Review

Back in the requester’s Code Review pane, I can see the status of each reviewer’s responses and their finished response (e.g. Looks Good).

At a glance the requestor can see any overall comments made. (I like that you can see how long ago a comment was made as well.)

If a requester wants to inspect inline comments, they can click the file name to open the diff tool. Commented code is highlighted in yellow.

The requester can continue to make changes and submit new code reviews. As long as they haven’t committed any code, the reviewers will still be comparing all proposed changes to what’s stored on the server. (See example screenshot below.)

Under the Close Review hyperlink, the reviewer has the option to click Close or Abandon to finalize the code review.

Closing a code review sets the State and Reason on the Code Review Request work item to Closed. Any Code Review Response work items remain unchanged.

Abandoning a code review also sets the State and Reason to Closed, but the Closed Status field is set to Abandoned. Linked Code Review Response work items also have their State and Reason set to Closed, but the Closed
Status is set to Declined and a Closing
Comment indicates that the requester closed the code review.

My opinion

I think this is a great feature. There is a lot of value in having code review integrated within the developer’s IDE. Code reviews should be easy and encouraged. Frequent code reviews not only catch bugs and improve maintainability, but they reduce the all-too-common ego that comes with the craft of writing software. Today’s serious application development is a team effort and the ownership of any new feature or bug fix should not be on one individual.

Here are some other features I’d like to see considered for future versions. Some of these could probably be done by editing the work item types and/or utilizing the TFS API.

  • Mouse-over comments – I think it would be a better experience to be able to mouse over the code in the diff tool and see the comments.
  • Configurable enforcement – Some organizations want every change to an application reviewed prior to release. It would be nice to have some setting to require code review. E.g. One setting might enforce a closed code review prior to check-in. (I’m going to try to develop this type of enforcement for Part 6 in the future.)
  • A Reviewers group – Some organizations designate one or more individuals as mandatory reviewers. It might be nice to have a list of these reviewers that could somehow designate a change as reviewed. The add recent reviewers capability is similar, but an organization may want more control over this group.
  • Review merged changesets – I’ve always tried to encourage my development teams to check-in code very frequently. This keeps changes atomic, but I may not want to overburden reviewers with incomplete thoughts so it would be helpful to select multiple changesets (or by label).
  • Lync – It seems like Lync could be incorporated to provide richer conversation options. At its simplest, I could tell if a reviewer or requester were online. It’d be interesting to somehow attach those conversations to the code review as well.
  • Additional reporting – It’s probably fairly straightforward to build with Excel hitting the data warehouse, but I think it would be more usable to right-click a file and not only see its version history, but all of the associated code reviews as well.

What do you think? Did the product team hit the mark with this? Do you value code reviews by your peers? How do you execute code reviews today?