Tommie 的个人资料: : Tommie照片日志列表更多 ![]() | 帮助 |
|
|
Build Artifact Moniker Confirmed as linking itemI've been wondering if the Build Artifact Moniker really is the linking item or not. I have now confirmed that it really is so. As we got the tip from Mr. König to look at hos Test Results are published, I decided to try it out. I created a new project (under my newly created Team Project - keep in mind the difference between Project and Team Project!), and generated some unit tests for the project by using the built-in wizard in Visual Studio. 2 tests were created. I ran the tests by choosing Test --> Run --> All tests in Solution... Next up was to click the Publish button in the Test Results view that appears at the bottom. See the picture below (I didn't care to implement the tests - I just wanted tests to run, never mind that they don't pass!) ...which takes you to the next screen, where the interesting stuff starts to happen: As you can see, you have to associate a build to your published test results. The text showing in the drop-down menu above is exactly the same as the one found in [dbo].[TfsWarehouse].[Build].[Build] field. (TfsWarehouse is the database, the first Build is the table, and the last Build is the column in the table). "Behind the scenes" the Build Artifact Moniker is hiding, mapped to each of these builds. How do I know that? Well, I had to do some experimentation. Here's how I did it. As in the picture above, I chose to associate build number "XjobBuild_20071203.1" to the test results. Keep in mind that I had not published any test results before, so the Test results table in the warehouse was empty.
When I had published the test results, I ran this query in Microsoft SQl Server Management Studio Express (auto-generated by right-clicking on the [TfsWarehouse].[dbo].[Test Result] table and choosing Script Table as --> SELECT To --> New Query Editor Window. I know I didn't have to choose all elements, but it was faster than manually typing the statement ;-) )
Among the results I got, I could see that Build Artifact Moniker == 7. So I ran this query on the the [TfsWarehouse].[dbo].[Build] table, in the same way as above:
And voila. In the table there is a row which has Build Artifact Moniker == 7, and the build name is - exactly as predicted - XjobBuild_20071203.1. It resides on the drop location \\ORCASBETA2_TFSV\share\XjobBuild_20071203.1. Conclusion: Build Artifact Moniker (B.A.M) is definitely the key identifier we should use to map our code metrics to a specific Build. Note that the B.A.M is a number, but the datatype in the SQL database is nvarchar(64) - it is not an int (!) 引用通告此日志的引用通告 URL 是: http://tomfury.spaces.live.com/blog/cns!F58BF7D0B46F52B9!275.trak 引用此项的网络日志
|
|
|