Thursday, October 26, 2006

After playing with Visual Studio Team System for a while, the biggest draw back I have seen so far in the Developer SKU is that I can't get my unit tests to run with a build. A team build requires a test list and the only way to create a test list is through Test Manager and that is only available in the Tester SKU. Fortunately, I have Team Suite so I was able to create a test list, but the downside is that where I work, I am one of the only people with Team Suite, so every time a developer creates a new unit test, I am the lucky one who gets to add it to the list. After doing this a couple of times, I found it got old very fast, so I started to look at the vsmdi file that contains the test information and found it was a pretty simple xml file. The simplicity ended very quickly, though, when I found the Guid created for each test in the list is not just generated with Guid.NewGuid(). I did some hunting on the web to figure out how this Guid is created, but came up empty, so I decided it was time to bring out my old friend ILDasm and see what happens under the covers. For anyone interested (and I can't guarantee it will stay like this since the code was not in a publicly exposed API), the below method will generate the correct Guid for a test (where FullName is the fully qualified name of the method <Namespace>.<Class>.<Method> - since test methods never take parameters, method overloading is not an issue).

private Guid GuidFromString()
{
  
SHA1CryptoServiceProvider provider = new SHA1CryptoServiceProvider();
  
byte[] buffer1 = provider.ComputeHash(Encoding.Unicode.GetBytes(FullName));
  
byte[] buffer2 = new byte[0x10];
  
Array.Copy(buffer1, buffer2, 0x10);

  
return new Guid(buffer2);
}

I am still in the process of creating an application that will create test lists like what is created with the Tester SKU, but I wanted to post this in case other people are struggling to find the same algorithm for their needs.

10/26/2006 10:12:04 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [41]  | 
Related Posts:
Test Management tool
Start and Stop Biztalk 2006 Applications

11/3/2006 5:01:59 PM (Pacific Daylight Time, UTC-07:00)
I only on VSTS Developer addition and a not having the ability to create test lists is a major pain. It would be greatly appreciated if you do create an app that will generate them!
Kevin Beck
11/15/2006 9:06:52 AM (Pacific Standard Time, UTC-08:00)
I second that... I'm just discovering the corner that we're being boxed into by only having dev sku's in our shop. Thanks VERY much for posting that code snippet; can you show us what the xml looks like for a sample vsmdi file? I've yet to see what a list should look like in the xml.
Jason Nadal
12/18/2006 1:24:11 AM (Pacific Standard Time, UTC-08:00)
Hi,
last week Ekobit released Test Manager Add-In for Team Edition for Software Developers that enables test management in the Dev SKU.

Read more about Test Manager Add-In: http://www.ekobit.com/testmngr.aspx.
Download the free 30-day trial of Test Manager Add-In from http://www.ekobit.com/download_testmngr.aspx
Announcement on the blog: http://ognjenbajic.com/blog/2006/12/test-manager-add-in.html

Regards,
Ognjen
6/13/2007 12:32:49 PM (Pacific Daylight Time, UTC-07:00)
I only on VSTS Developer
6/21/2007 11:53:09 PM (Pacific Daylight Time, UTC-07:00)
Thank you for sharing.
8/7/2007 12:18:02 AM (Pacific Daylight Time, UTC-07:00)
good website,my nice site!
9/3/2007 9:28:25 AM (Pacific Daylight Time, UTC-07:00)
I wanted to post this in case other people are struggling to find the same algorithm for their needs.
9/6/2007 4:24:33 PM (Pacific Daylight Time, UTC-07:00)
nice site.
9/6/2007 4:54:55 PM (Pacific Daylight Time, UTC-07:00)
excellent site.
9/20/2007 8:01:31 AM (Pacific Daylight Time, UTC-07:00)
I am still in the process of creating an application that will create test lists like what is created with the Tester SKU,
10/20/2007 6:25:57 PM (Pacific Daylight Time, UTC-07:00)
We sell very cheap runescape gold 4.5$/1000k
We are the professional e-shop for runescape GP-selling, with the cheapest price, the fastest delivery, the best service! With the credit guarantee of alllgamegold.Our URL is
http://www.alllgamegold.com
it is security、quickly delivery and good service. For more info, visit our site or be free to use our 24/7 online support!
My blog is http://runescapeblogmaster.blogspot.com/

10/24/2007 6:32:27 PM (Pacific Daylight Time, UTC-07:00)
Thanks for sharing them with us.
10/24/2007 6:51:15 PM (Pacific Daylight Time, UTC-07:00)
excellent site.
11/12/2007 10:29:02 PM (Pacific Standard Time, UTC-08:00)
It would be greatly appreciated if you do create an app that will generate them!
11/17/2007 6:35:32 PM (Pacific Standard Time, UTC-08:00)
fine
11/17/2007 6:40:25 PM (Pacific Standard Time, UTC-08:00)
You may know by a handful the whole sack.
11/22/2007 7:10:57 AM (Pacific Standard Time, UTC-08:00)
客户关系管理
12/20/2007 11:48:45 PM (Pacific Standard Time, UTC-08:00)
weizhen.lsx.good
1/29/2008 8:22:08 PM (Pacific Standard Time, UTC-08:00)
You might want to clean up all the spam comments on this page, they might be negatively affecting your site ranking!

Stu
1/30/2008 11:12:12 PM (Pacific Standard Time, UTC-08:00)
I'm just discovering the corner that we're being boxed into by only having dev sku's in our shop. Thanks VERY much for posting that code snippet; can you show us what the xml looks like for a sample vsmdi file? I've yet to see what a list should look like in the xml.
2/21/2008 11:13:24 PM (Pacific Standard Time, UTC-08:00)
Thanks so much for this! This is exactly what I was looking for.
3/12/2008 7:12:59 PM (Pacific Daylight Time, UTC-07:00)
换热器
4/28/2008 5:21:14 AM (Pacific Daylight Time, UTC-07:00)
http://www.sunlsx.net assembly line
5/10/2008 5:12:25 AM (Pacific Daylight Time, UTC-07:00)
Cheapest Tramadol Low Cost
5/10/2008 5:13:47 AM (Pacific Daylight Time, UTC-07:00)
Cheapest prozac
5/10/2008 5:15:14 AM (Pacific Daylight Time, UTC-07:00)
cheap wellbutrin
5/10/2008 5:16:37 AM (Pacific Daylight Time, UTC-07:00)
cheapest ultram now
5/10/2008 5:18:07 AM (Pacific Daylight Time, UTC-07:00)
Fioricet Without A Prescription Online
5/21/2008 12:41:45 PM (Pacific Daylight Time, UTC-07:00)
Thanks for the articl.
6/8/2008 10:29:47 AM (Pacific Daylight Time, UTC-07:00)
DSFDASFA
7/5/2008 9:19:53 AM (Pacific Daylight Time, UTC-07:00)
Thanks for sharing them with us......


8/13/2008 10:31:56 PM (Pacific Daylight Time, UTC-07:00)
[url=http://www.njhuojia.com/]货架[/url]
[url=http://www.huojia2008.net/]仓储货架[/url]
[url=http://www.huojia.name]货架[/url]
[url=http://www.huojia.name/hj/]货架[/url]
[url=http://www.hulanwang.net]护栏网[/url]
8/26/2008 5:33:33 PM (Pacific Daylight Time, UTC-07:00)
online roulette
8/26/2008 5:36:27 PM (Pacific Daylight Time, UTC-07:00)
online blackjack
8/26/2008 5:50:07 PM (Pacific Daylight Time, UTC-07:00)
casino blackjack
8/26/2008 5:54:35 PM (Pacific Daylight Time, UTC-07:00)
onlien video poekr
8/26/2008 5:57:28 PM (Pacific Daylight Time, UTC-07:00)
poker calculator
8/26/2008 6:02:42 PM (Pacific Daylight Time, UTC-07:00)
horse racing betting
8/26/2008 6:05:30 PM (Pacific Daylight Time, UTC-07:00)
forex
8/26/2008 6:08:04 PM (Pacific Daylight Time, UTC-07:00)
iphone
11/13/2008 7:32:05 PM (Pacific Standard Time, UTC-08:00)
[url=http://www.lfhg888.com.cn]金属缠绕垫[/url]
[url=http://www.lfhg888.com.cn]阻垢剂[/url]
[url=http://www.lfhg888.com.cn]杀菌灭藻剂[/url]
[url=http://www.lfhg888.com.cn]聚四氟乙烯垫片[/url]
[url=http://www.lfhg888.com.cn]聚四氟乙烯盘根[/url]
[url=http://www.lfhg888.com.cn]高水基盘根[/url]
[url=http://www.lfhg888.com.cn]芳纶盘根[/url]
[url=http://www.lfhg888.com.cn]岩棉[/url]
[url=http://www.lfhg888.com.cn]玻璃棉[/url]
[url=http://www.lfhg888.com.cn]硅酸铝[/url]
[url=http://www.weimatj.com/qxy.htm]切削液[/url]
[url=http://www.weimatj.com/fxj.htm]防锈剂[/url]
[url=http://www.weimatj.com/tqj.htm]脱漆剂[/url]
[url=http://www.weimatj.com/tzj.htm]脱脂剂[/url]
[url=http://www.dianping.org]北京搬家公司[/url]
[url=http://www.xclj.com]物理清洗[/url]
[url=http://www.xichenji.com]吸尘器[/url]
[url=http://www.xichenji.com]除尘器[/url]
[url=http://www.xichenji.com]集尘机[/url]
[url=http://www.xichenji.com]收尘器[/url]
[url=http://www.xichenji.com]不锈钢除尘器[/url]
[url=http://www.xichenji.com]烟雾除尘器[/url]
[url=http://www.diyicheng1992.com.cn]北京度假村[/url]
[url=http://www.diyicheng1992.com.cn]天津度假村[/url]
[url=http://www.diyicheng1992.com.cn]天津周边会议[/url]
[url=http://www.diyicheng1992.com.cn]北京周边会议[/url]
[url=http://www.diyicheng1992.com.cn]天下第一城[/url]
[url=http://www.diyicheng1992.com.cn]中信国安第一城销售部[/url]
[url=http://www.maxminchina.com]天津写字楼网[/url]
[url=http://www.maxminchina.com]天津租房网[/url]
[url=http://www.maxminchina.com]天津房屋出租信息[/url]
[url=http://www.maxminchina.com]天津租房信息[/url]
[url=http://www.maxminchina.com]天津写字楼出租[/url]
[url=http://www.maxminchina.com]天津写字楼[/url]
[url=http://www.maxminchina.com]天津别墅出租[/url]
[url=http://www.maxminchina.com]天津租房[/url]
[url=http://www.maxminchina.com]天津 租房[/url]
[url=http://www.maxminchina.com]租房天津[/url]
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):