Extending the Reporting Engine
|Extensibility Guided Tour|
|Extending the Reporting Engine|
Glossary Item Box
Reporting Engine Extensibility
Reporting in Visual Studio Team System facilitates invaluable communication about the status, trajectory, health, and timeliness of a Team Project. By tightly coupling developer activity to tangible metrics such as code churn, bug rates, code coverage, and other key considerations, development efforts become much easier to track, evaluate, and predict.
The Team Foundation Reporting Engine and Extensibility
Visual Studio Team System supports reporting by tracking developer actions in a data warehouse. Code Checkouts and CheckIns, as well as changes to lines of code while out, are tracked along with other tangibles such as developer progress through various work items and entered into a data warehouse. Once data has been pushed to the data warehouse, reports can present the data in meaningful and beneficial ways. Out of the box, VSTS tracks complex information relative to Source Control, Build operations, and Work Items. Data tracked for these various components is stored in the data warehouse as OLAP Facts, and comprised of Dimensions, Measures, and Details – all of which lend themselves nicely to being used in customized reports as desired. It is also possible, given the attention to extensibility provided by the Reporting Engine Team, to extend Team System to track custom entities – providing customers and Visual Studio Integration Partners the opportunity to track their own data and then expose it data mining as an additional project metric.
The VSTS Reporting Engine
The capture of developer related activity is tracked directly into OLTP databases used by Team Foundation Server to manage various aspects of code interaction, work item processing, etc. To move the data from these OLTP databases and into a single OLAP database used for data mining and reporting, Team Foundation Server employs a warehouse service to periodically marshal data into the warehouse. The service, in turn, relies upon XML schemas to describe the kinds of data to move as well as how to transform it into applicable Facts consumable by the data warehouse for reporting. To handle the transformation of data, the schema document points to an assembly which implements the IWarehouseAdapter interface, and which can then be used to translate data as desired through custom handling. Together, the Schema and Adapter provide a high degree of flexibility that make it possible for powerful extensions to the VSTS Reporting Engine.
The Warehouse Object Model
VSTS also exposes an object model that allows programmatic interaction with an instance of the Team Foundation Warehouse. This object model makes it possible to automate interaction with key aspects of the underlying warehouse, and serves as a core interface for VSTS extensions and the VSTS reporting functionality. Programmatically interacting with a Warehouse Server is a straight-forward process. Connections to Team Reporting Warehouses are implemented as IDataSource instances, and once obtained provide programmatic access to the underlying Team data. Once a connection to the Warehouse has been created, a new object (such as a work item, a bug, a new person, etc.) can be created, properties can be set, the object can be saved, and the connection can then be dropped. Objects created while connected to the Warehouse instance can either be Facts, Dimensions, or FactLinks – all of which are abstracted to utility types in the WarehouseAdapter namespace to make object interaction easier. Details on the specifics of this interaction, along with sample code showing how to interact with the object model can be found in the VSTS Section of the VS SDK (in the Reporting folder, specifically in the Extending the Team Foundation Reporting Warehouse.doc whitepaper.)