TFS at Nokia?

by jesfer 14. February 2011 17:12

Nokia will use WP7 as their primary smart phone platform. I wonder if they’ll start to use other Microsoft platforms/products as well… Visual Studio and TFS seems like a logical choice for development and application lifecycle management Smile

Tags:

ALM | Random thought | TFS

Test steps and results in TFS 2010

by jesfer 7. January 2011 12:56

All SSRS reports you get out of the box with TFS 2010 are trend reports and they don’t show any details. I was recently asked to build a custom report listing all test cases in a test plan and for each test case every step should be listed with action, expected result ant test outcome. Basically the same kind of info you can get for a single test case when you view the test results in Microsoft Test Manager 2010. This turned out to be quite a bit trickier than expected but after getting some much needed info from a developer at Microsoft (thank you Sriram) I was able to get it all together.

Getting test steps and results from Tfs_DefaultCollection

Test steps are stored as XML and are found in table WorkItemLongTexts. You can use this query to get them.

declare @fldIdSteps int = (Select top 1 fldid from Fields where ReferenceName = 'Microsoft.VSTS.TCM.Steps')
select * from WorkItemLongTexts where FldID = @fldIdSteps

Test results for each step are found in table tbl_TestActionResult. You can use this query to get them.

select * from tbl_TestActionResult

Now, you’ll notice there are a couple of issues popping up. You’ll need to join a XML result with a table result, there might be several revisions of the test steps and there are probably many results saved for each and every test case. But most of all, there is no obvious way to link steps to results. Every test step has an ID but tbl_TestActionResult does not contain a “test step ID” column.

ActionPath explained

This is where the column ActionPath in tbl_TestActionResult comes in. This column will typically contain an empty string, 8 chars string or 16 chars string. For a specific test result in a test run there will be one line with the empty string (this line is the over all test result) and then one line for each step, containing 8 or 16 chars. These ActionPath chars are hierarchical hexadecimal representations of test step ids. The first 8 chars is the step id and the next 8 chars (if they exist) is a shared step id.

And now you have the knowledge needed to pair up test results with corresponding test steps!

Some issues to consider…

There are a few more issues you’ll have to tackle as well.

  • Step ID != Sequence number. The test step id is not the same as the numbers you see when viewing a test case in a GUI. The numbers you see in the GUI are generated in the GUI to clarify the step sequence. The step id is never shown and the sequence number is not stored in the database. You’ll have to rely on the order of the <step> elements in the XML to figure out the step sequence.
  • Revisions and result. There can be several revisions of the test steps stored in table WorkItemLongTexts and there can be several test results stored for each revision. You’ll have to compare timestamps for revisions and results when joining them to avoid errors.
  • Performance. The Database Tfs_DefaultCollection is the production database and you should always take performance hits into consideration before deploying reports that read directly from your production database.

More details

When I first tried to figure out how this all worked I put a question up at the MSDN forums. For SQL and code samples you can go to my post on MSDN and get some more details.

Tags:

TFS | ALM | XML | SQL

TFS Azure

by jesfer 29. October 2010 12:58

Yesterday at the PDC keynote it was announced that a CTP of TFS on Windows Azure will be avilable in early 2011. From what I've seen soo far this looks really interesting. All the new Azure stuff should provide som very interesting benefits. I'm envisioning a really simple way to handle virtual machines for Lab Management, build servers, load test etc. And no more worries about single or multi server deployment. Cant wait to hear more about this!

Tags: , ,

ALM | TFS

Changes...

by jesfer 23. April 2010 08:35

In case anyone noticed... I changed the heading of this blog from "GUI, .Net and..." to "TFS, ALM and...". Now why did I do that? Basically because it is what I'll be working with from now on and it is very interesting Smile The "anything else that comes to my mind" leaves a lot of room for other stuff though. Like Mushroom Management and other interesting things...

Tags:

TFS | ALM

About me

My name is Jesper Fernström, I live and work in Stockholm, Sweden. I'm an ALM and TFS expert at QWise and a Professional Scrum Trainer with Scrum.org.

About QWise

QWise offers services in the area of Application Lifecycle Management and is a Microsoft Gold ALM Competency Partner.

We are  the leading experts on Microsoft Visual Studio ALM in Sweden and are located in Stockholm and Gothenburg.

Read more about our services at http://www.qwise.se

Month List