Alexander Vanwynsberghe

"There is nothing impossible to him who will try"

Cloning Microsoft Test Manager 11 Test Suites

With the next version of Microsoft Test Manager, MTM11, there is a possibility to clone test suites across plans. This is something which can be very helpful if you’re working on multiple releases. This way, you can clone an existing Test Suite from a previous release, and just change the necessary things related to the new release. When you clone a test suite, the new suite will contain the copies of all test cases in the source suite. However it will not retain all historical data like the previous test runs, the related bugs, old results. It provides a clean starting point.

Getting started

This feature is available through the command line utility tcm.exe. You can start this utility using the ‘Developer Command Prompt‘ from Visual Studio 11 (beta). Start->All Programs->Microsoft Visual Studio 11->Visual Studio Tools. Enter ‘tcm‘ to see the list of available commands:

We will continue with the ‘tcm suites’ command. This command will provide us all operations related to Test Suites, like listing and cloning. The first thing you can do is get a list of all available Test Suites using the ‘tcm suites /list’ command. This will give you a list of Suites with an ID and a Name. This ID is useful to know when you want to clone from one Suite to another Suite. For each command you want to execute, you have to provide the URL of your Team Project Collection and the Team Project Name you want to work with. In my case (using the great HOL VM from Brian Keller), the command is:

tcm suites /list /collection:http://vsalm:8080/tfs/DefaultCollection /teamproject:FabrikamFiber

In this example above, I have “TestPlan1” containing the ‘A Demo Suite‘ test suite. What I want to do is clone this test suite into “TestPlan2“. So I want Id 3 to be cloned in Id 2. To do this, just use this command:

tcm suites /clone /suiteid:3 /destinationsuiteid:2 /collection:http://vsalm:8080/tfs/DefaultCollection /teamproject:FabrikamFiber

When this command is executed, the clone operation is ongoing. This command returns an operation Id back. This Id is an identifier of the actual clone process. In some cases, a test plan/test suite can contain a large number of test cases, resulting in an operation which can take a serious amount of time. In my case, it’s only a small one. What you can do to follow the process of the clone operation is executing the following command:

tcm suites /clone /status:2 /collection:http://vsalm:8080/tfs/DefaultCollection /teamproject:FabrikamFiber

As you can see, the operation ‘2‘ has succeeded. You also have some information about the clone operation like the number of test cases cloned and the cloned shared steps.

Each clone operation is stored in the TFS_DefaultCollection (or TFS_YourTPC) database. You can get an overview using table ‘tbl_CloneOperation’ where you have the same information as in the screenshot above.

This is a nice (hidden) feature in the new improved version of Microsoft Test Manager 11. I hope they will include this command in the interface so you don’t have to use the commandline version of the tool. Thanks for reading!

Exploratory testing with MTM 11

Today, I want to talk a little bit more about what exploratory testing is, and especially how you can do exploratory testing with the new Microsoft Test Manager 11.

Last month, I followed an ISTQB training where I got some lessons about Fundamentals of testing, Test design techniques and Test management. One part of the course was about exploratory testing, why use it, and mostly why not use it. I didn’t really agree about the fact that they discourage the use of exploratory testing, and definitely not agree if you use MTM11 to do exploratory testing. I’ll show you why.

What is exploratory testing?

According to Wikipedia:

Exploratory testing seeks to find out how the software actually works, and to ask questions about how it will handle difficult and easy cases. The quality of the testing is dependent on the tester’s skill of inventing test cases and finding defects. The more the tester knows about the product and different test methods, the better the testing will be.

Exploratory testing is all about simultaneous learning, test design and test execution. It’s a powerful and a fun approach to testing as you don’t have to follow a formal test plan, and you can use the system like an end customer should do. Like Anu Bharadwaj said in her ALM summit session, exploratory testing is about focusing on customer and business value. You have to ask yourself the questions: Does the software do what I want it to do? Does it act like it has to act? Those are the things a customer will also look at. They are not interested in how many bugs are fixed, which scripts you use,..


Microsoft Test Manager 11

Microsoft Test Manager 11 is the new to be released version in the ALM suite of Microsoft. MTM 11 will allow you to run exploratory tests on your software. The nice thing is that exploratory test sessions might be associated with user stories. That way, you can verify that the user story behaves correctly. It also provides an easy way to create manual test cases based on the action steps during your ET session. If you create a manual test based on the action steps that are recorded, the manual test case is automatically associated with your user story and all bugs that you file during this session will also be automatically linked to that story. The bug will also have some rich diagnostics attached.

Starting an exploratory test session

In this example, let’s start with creating new test plan in MTM

  • Open the application and connect to your TFS11 environment (for tfs preview, use , without the port 8080)
  • In the testing center, click ‘Add’ and enter a name.
  • Select the new plan and click ‘Select Plan’
  • You’re now connected to the Exploratory Testing test plan.
  • Now you can go to the ‘test’ tab and select the ‘Do Exploratory Testing’ functionality
  • There you see an overview of all the work items that can be tested. You can also select ‘explore’ to start without a link to a work item.

Executing an exploratory test

  • Click on the work item you want to test, and click the green arrow ‘Explore work item’
  • You should see the MTM test-bar on the left side of the screen.
  • If you want, you can enable Video and Audio recording by clicking on the settings button on the bottom-right corner and select the checkbox for video/audio recording
  • Let’s start the test by clicking ‘Start’
  • Now you can do your ‘test’ .. the one I selected was about getting an overview of the available session on the techdays 2012 website.
  • We open IE, enter the URL
  • When the website is loaded, we want to create a partial screenshot of the header
  • Click on the ‘screenshot’ button.
  • We select the piece we want
  • Now you see the screen capture in the description box of the test-bar
  • Double-click on the image, and Paint should open
  • In Paint, you can add whatever you want to the screenshot
  • When you are ready, just save it, and close Paint
  • You see that the screenshot in your editor has the changes you just made
  • Now you can continue with your test and do/test whatever you want
  • Save your session by clicking on ‘End testing’
  • You now see an overview of your test

Create test case from your exploratory test

In MTM11, there is a possibility to file a bug or create a test case while you are running your exploratory test.

  • Let’s start a new session, not linked to any work item. Click on the ‘explore’ button
  • Start your test and do what you want to do
  • When you find a bug, click on the ‘Create bug button’
  • You see a new ‘bug’ window
  • The steps to reproduce screen is completed with all your steps
  • You can also change the steps to be included in the bug by clicking on ‘Change steps’
  • In the new dialog, move the slider to change the visible actions
  • You can now save your bug, or click on ‘Save and create test’
  • When you click on that, a new test case dialog opens. The steps from the test case are also completed
  • You can save this test case.
  • When you finish your current test session, you can see that there is one bug and one test case linked to this test.

Now you got an overview of how you can define and run exploratory tests with MTM11. In a next post, I will talk a little bit more about session based test management and testing tours. Thanks for reading!

Note: I also found a little issue when using MTM11 in combination with tfspreview. When you add some screenshots to your test, you see a ‘missing image’ error when you look at the test afterwards. More info here