码迷,mamicode.com
首页 > 其他好文 > 详细

Gumshoe - Microsoft Code Coverage Test Toolset

时间:2014-07-18 19:08:36      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   java   color   strong   

Gumshoe - Microsoft Code Coverage Test Toolset

2014-07-16

What is Gumshoe?

How to instrument a binary?

How to collect data?

How to vewi results?

Gumshoe concpets

Gumshoe Server

 

What is Gumshoe?


 Top

Gumshoe is a toolset for integrating code coverage into the workflow between developers and testers by providing real-time feedback on the code coverage of code changed by a developer.

DownLoad (The version 2.0.1300.1000 is stable)

How to instrument a binary?


 Top

Instrumentation is the process of adding hooks into a binary so that code coverage can be collected on it when the binary is run.  Gumshoe uses Magellan to instrument most built binaries (i.e. .NET, C, C++ binaries).  Gumshoe also supports plugins for javascript instrumentation.

Instrumentation typically produces three files:

  • An instrumented binary,
  • an instrumented pdb,
  • and a covsym file. 

The covsym file must be added to the session for Gumshoe to be able to then collect coverage on the instrumented binary.

Attention: Instrumentation can cause binaries to run slower than usual.  You probably will not want to do performance tests with instrumented binaries.  Badly designed tests can sometimes fail because actions may take longer on an instrumented binary than a non-instrumented binary.

step-by-step instruction


 Top

 

Gumshoe Concepts


 Top

Code blocks and arcs:

A block is a sequence of machine instructions with exactly one entry point and one exit point. An arc is what connects two blocks to one another

Coverage symbols (covsym):

Gumshoe needs "resources" to properly interpret data. A coverage symbols file, also known as a covsym, maps binary data from the instrumented binary executable specific to the build being tested.

DPK:

A SD(Source Depot) Package file commonly used by various groups across the company to bundle a batch of source code changes. In fact, the Office triage process is based on SD Packages. A .dpk file is used to pass around a set of diffs as a single unit and consists of base source files, your modified source files and a manifest, bundled in a zip file with the extension .dpk. SDPack provides mechanisms to create, manage, view, and apply .dpk files. See Toolbox for more information on SDPack. A DPK file can be added to Gumshoe as a resource. From that DPK Gumshoe will automatically generate a filter based on the changed\added code in addition to extracting the modified source files so that you can see an annotated view of the code without having to first locate the source files.

Filter:
A filter is used in Gumshoe to scope down a change. One of the most common scenarios for a filter is applying a source line filter (or a DPK filter) to see the coverage scoped to a particular changelist. Other filters include symbol filters, which allow you to filter on static covsym data such as BinaryName or Directory, and trace filters, which allow you to filter based on a trace name.

Sessions:
Once a Gumshoe session is started, it remains active until you specifically enter the command to end the session, even if you reboot your computer.

Reference

[1] https://microsoft.sharepoint.com/teams/Gumshoe/default.aspx

Gumshoe - Microsoft Code Coverage Test Toolset,布布扣,bubuko.com

Gumshoe - Microsoft Code Coverage Test Toolset

标签:des   style   http   java   color   strong   

原文地址:http://www.cnblogs.com/Ming8006/p/3850904.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!