Saturday, December 6, 2014

Testing your application with Microsoft Test Manager: a quick howto

We're rushing a bit towards the end of the year at work and since we're a multi-disciplinary team ( very Agile ;) ), and so I'm contributing by testing some WCF service a colleague created. So I dusted off MS Test Manager again and found that I still like it very much. Three arguments:

  1. Since you plan out your test before, it forces you to think about the tests. I know there's exploratory testing too, but here I used planned testing.
  2. Tests can easily be reproduced to re-test the bugfix, by anyone
  3. Creating a bug report from test manager is SO powerful. It gives such detailed information about the steps that lead to the bug. The dev knows exactly what happened up until the point that the system failed.

So let me take you through a quick tour of MS Test Manager and how to get started with testing.

Assuming you have a project in TFS, open up Test Manager and select the project. If you don't have a project, create one in TFS. I'm using TFS online for this demo.


Create a testplan. I saw that the testers at work had plans like 'Regression tests system-a', 'Tests for sprint 32 system a', so that's the kind of scopes you need to think of.


After selecting the plan, the Test Manager screen opens and you see the test plans. There's nothing in my case, since I just created the test plan.


So since I'm going to be brief here, I just want to focus on these two main buttons at the top, the 'Plan'  and 'Test' buttons. Let's start by writing a testplan, by hitting the 'New' button:


So I noticed yesterday as well that the first steps were 'shared steps' often. Some of the tests start with these steps, so it makes sense to make them shared. They're like [TestInitialize] if you're used to writing unit tests.

So I created a shared step 'Open browser and navigate to google calculator'


Double click it and you get to define the sub-steps for this shared step:


Be sure to fill out the 'Expected result' column. Especially for proper testing steps of course. Save and close this screen and return to the original plan.

 
Here are the finished steps of my test. Now let's save an close this screen and return to the home screen.

As you can see, the test is now planned. So now we go over to the Test side of Testing Center:


OK - so we see that our test is present in the Test area, let's go ahead and run it:


What you should see is that the Test Runner window will go on the left of your screen and show you the steps to do for testing, which you can do in the rest of the screen:


Clicking the 'Create action recording' checkbox makes a video from you running the test. Let's just hit Start Test:


On the top left there's controls that allow you to pause / stop the tests you're running. In case something comes up during the testing. 

The triangle lets you expand the shared steps and shows the sub-steps of the 'Start browser and navigate to Google calculator' shared step.

At the right of each step you have the option to pass/fail a test.
Right-clicking on the test lets you add comments. Be sure to utilize taking screenshots, they are added to the test results quickly:



And now for the cool stuff: let's create a bug for the dev team. That's the button on the top right, left of the screenshot tool. It opens the new bug window:


It creates a bug with all the test steps, screenshots, expected results, comments etc. Coming from an organisation where bugs came in with information like 'login doesn't work', I'm very very happy with descriptions like this.


De developers that typically aren't in test manager, can see the reproduction steps and open the test case by clicking either 'Test case' on the left, or click 'Links' on the right and see both the testcase ( will show in TFS ) or the test result ( will open in Test Manager ).

Tip: If you want to add this bug to an existing backlog item, you want to add a link to a parent item, and select the backlog item there.


Going back to test manager, where I stopped, saved and closed the test, you can see that one testrun has failed. If the dev now fixes the issue, the tester just re-runs this test and if all is well, passes the test.



No comments:

Post a Comment