Team Foundation Server Reporting

Reporting is one of the most powerful features of Team System. Any data stored in the data warehouse can be viewed as a report, which enables you to view and organize project metrics very easily. This includes work item tracking (tasks, bugs, and requirements), test results (unit, static, and dynamic tests), quality indicators (performance and code coverage), build reports, schedule reports, and overall project health reports. You can also create customized reports for your clients or business analysts, and the best part is that you don't have to invest a lot of money in third-party tools to get quick and cost- effective results.

The reporting tools are not only useful for project managers, but also for team members in every role. For example, a developer can look at test results and home in on specific bugs. At the heart of the reporting features is SQL Server 2005 Reporting Services. (You will learn more about this feature later in the chapter.)

Working with Team Reports

Team System has many public reports available right out of the box (19 reports duplicated across both MSF for Agile Software and MSF for CMMI Process Improvement process templates). From a project management perspective, one of the great advantages of using Team System is that you don't have to manually correlate data from a host of third-party sources. All reports are available in a tightly integrated fashion within the report site, which is accessible using Team Explorer and through your web browser.

Managing Reports using Team Explorer

You can access project reports in Visual Studio using the Team Explorer. The reports listed in Figure 19-24 are part of the MSF for Agile Software Development process and can be found in the tree under Reports image from book Public. To view a report, simply click on it; the results will appear in the middle pane.

image from book
Figure 19-24

Managing Reports using the Reporting Services Report Manager

You can also access the default (and custom) reports using the project portal. In Team Explorer, expand your project and right-click on Reports. To view the available reports, select Show Report Site. You can also manually access the portal by typing the following link in your browser: /Reports/">http://www.<ApplicationTierName>/Reports/. You'll see a page very similar to the one shown in Figure 19-25.

image from book
Figure 19-25

Figure 19-26 illustrates a typical Bug Rates report. As you can see, the Active Bugs Backlog is decreasing at a healthy rate, while the bugs are getting resolved and activated at a constant rate. This particular report indicates that the project is in good health (at least you are effectively finding, fixing, and closing bugs).

image from book
Figure 19-26

Analyzing trends within a project

Once you have the data, you need to be able to correctly interpret the metrics in order to make high-level decisions for your project. Let's look at a few case studies to get a handle on how data is presented in a report and how to interpret the results. Figure 19-27 shows a typical Velocity report.

image from book
Figure 19-27

The Resolved Bugs rate (represented by the lines with diamonds on the graph) indicates that a variable number of bugs are being fixed. The Closed Bugs Rate (represented by the line with squares) also shows a variable number of bugs being closed. This lack of consistency on the graph indicates that your developers are inconsistently resolving bugs. The problem can be solved by better planning and implementing a formalized methodology on the prioritization and elimination of bugs.

Another example is the Remaining Work report, shown in Figure 19-28.

image from book
Figure 19-28

There is a predominant negative trend indicated on this report. The Active Scenarios Backlog will not be resolved by the end of the project as indicated by the dotted line. Based on this trend, it would be important to re-evaluate the distribution of work, perhaps allocating more personnel to work through scenarios.

A final example is the Unplanned Work report, shown in Figure 19-29.

image from book
Figure 19-29

As you can see in the diagram, there are a number of planned and unplanned work items in play. The amount of planned work is decreasing, which is a healthy trend. However, the darker area representing the unplanned work is also increasing a bit. The report provides a way to figure out in advance what buffer is required to make sure that your team doesn't get overwhelmed.

Viewing reports using Microsoft Excel pivot tables

You can view your project data using an Excel pivot table. One of the key advantages of using a pivot table is simplicity — Microsoft Excel mines the data warehouse directly and has the built-in capability to display rich graphs and charts. (See Figure 19-30 for an example of data imported into Excel.) Here is how you can set up Excel to view your project data:

  1. Open Microsoft Excel.

  2. Select Data image from book PivotTable and PivotChart Report.

  3. Select External Data Source and Pivot Table and then click Next.

  4. Click the Get Data button.

  5. Select the OLAP Cube tab, select New Data Source, and then click OK.

  6. Write a custom name for your data source. (If you are unsure, write in something like TFS- DATA.) To use Pivot Tables, you need to first download the OLEDB 9.0 drivers. If you want to install the drivers without having to install all of the SQL client tools, please refer to this package:


    If the OLEDB drivers have been installed and you encounter an "Initialization of the data source failed" error, simply go to Start image from book Run, and type Regsvr32 "C:\Program Files\Common Files\System\Ole DB\msolap90.dll."

  7. Select the Microsoft OLE DB Provider for Analysis Services 9.0 and click Connect.

  8. A new window entitled Multidimensional Connection 9.0 will pop up.

  9. Select Analysis Server; under Server, enter (local).

  10. Enter the credentials you used for TFSSETUP in the User ID and Password fields. (The wizard will warn you if your credentials are invalid.) Theoretically, you should not need credentials, but you need to be a member of the TFSDataWarehouseReader role on the cube. You can set this up using the SQL Server Management Studio.


    If you enter incorrect credentials or credentials that don't have sufficient permissions to access the cube, you may receive an "error occurred in the transport layer" message. You can avoid the error message by entering valid user names and passwords.

  11. Select the TFSWarehouse database and click Finish.

  12. Select Team System, check Save My User ID and Password, and click Yes. You may get a warning that your user name and password will not be encrypted. The wizard will not allow you to move forward until you accept the warning. It's an important consideration if you are not in a secure environment (i.e., working from a coffee house hotspot).

  13. Click OK in the Create New Data Source dialog box; click OK once more.

  14. Click Finish in the PivotTable dialog box.

image from book
Figure 19-30

At this point, you can select any fields you want to view in the pivot table. Select the items that interest you and drag them into the Pivot Table. For example, you may be interested in seeing ChangeSet information. The information will auto-magically appear in the Excel spreadsheet within the pivot table. You can then save the sheet or choose to manipulate it at will.

Building custom reports

Microsoft provides you with a good variety of reports to help you evaluate the health of your project. However, sometimes you will want to create custom reports to view your data in different ways, based on business requirements. The good news is that, like many other parts of Team System, the reporting feature is completely customizable and extensible. All of the default reports included in the process templates are written as Report Definition Language (.rdl) files. These files are defined by an XML-based schema that makes them interoperable with a variety of tools, including Visual Studio. For more information about the Report Definition Language file specifications, please visit the following link:

Of course, you don't need to write low-level XML to create reports. Team System comes with a variety of tools, including the Report Builder, the Report Designer, the Business Intelligence Development Studio (BIDS), and even Microsoft Excel. The Report Designer and the Business Intelligence Development Studio are add-ins for Visual Studio 2005. Once you have created your custom reports, they can easily be bundled with your process template to be redeployed whenever you want to create a new project. Chapter 22 has useful information about how to incorporate reports as documents (also known as work products) within a process template.

Creating custom reports using the Report Builder

Report Builder is a ClickOnce application that is integrated in SQL Reporting Services. It's designed for business analysts and developers who wish to create custom reports quickly and easily. You can launch it by clicking the Report Builder option on the Report Manager menu bar. (You can bring up the Report Manager by right-clicking a project Reports folder in Team Explorer and selecting Show Report Site.)

Before you can access Team System data, you'll have to create a Semantic Model Definition Language (SMDL) model. As complicated as that sounds, creating the model is actually a simple process:

  1. Go to the Home page of SQL Reporting Services. (The URL is /Reports/">http://www.<yourapplicationtier>/Reports/.)

  2. Click the TfsReportDS data source link.

  3. At the bottom of the next page, you will see a button that says Generate Model. Click the button.

  4. You'll then be prompted for a Name, Description, and Location. Name the model "TfsReportDS."

  5. Once you are finished, you are ready to start building a report. Launch the Report Builder by clicking the link from the front page of the Report Manager site. (You can access the Report Manager by right-clicking your Team Project reports folder in Team Explorer.)

  6. Once the application launches, you can choose whether your report is a matrix, chart, or columnar table. Select the "TfsReportDS" model and select your report type; then click OK.

  7. A report template will appear with an area where you can drag and drop data fields onto it. To create a build report, click the Build entity and select the fields you want to appear on the report. You can also drag and drop entities. (Entities are a logical collection of fields and other data type.) You can then save your report by selecting File image from book Save. Once you click Save, you'll have the option of placing your report in any Team Project you want.

You can mix and match the entities and fields to get unique views of your project data — for example, mixing your build data with changeset data.

Viewing and running your custom reports

There are many different ways you can access and view reports in Team System. You can use Team Explorer or the Team Project report site, or use Microsoft Excel templates or pivot tables. Here are the steps you follow to view the report in Visual Studio using the Team Explorer:

  1. Go to the Team Explorer pane.

  2. Select YourProjectName image from book Reports.

  3. Right-click on any project you want.

  4. Select the Open option. The report will open in Visual Studio.

You can also access reports via the Team Project report site. Here are the steps to access and launch the reports in a web browser:

  1. Go to the Team Explorer pane.

  2. Right-click on Reports within one of your projects.

  3. Select Show Report Site.

Alternatively, you can access the report site by clicking Team image from book Show Report Site (note that you have to be connected to your Team Foundation Server for this to work). To learn more about creating reports and fully leveraging the reporting features of SQL Server 2005 Reporting Services, please visit the SQL Server Developer Centre at the following link:

Report site security

The SharePoint project portal and the Team Reporting sites have to be configured separately from the rest of Team Foundation Server. As with Team Foundation Server, you can simply add server groups to the report site to provide easy administration. Or you can opt to add individual users to provide a higher level of granularity in your security approach per report.

You can access the security setting for your site by first opening up the reports site. Right-click on Reports in Team Explorer and select View Report Site. Once the Report Site appears, click on the Site Settings link on the upper-right corner of the page. At the bottom of the new page, you will have the option of configuring site-wide security, configuring item-level role definitions, and configuring system- level role definitions (as shown in Figure 19-31).

image from book
Figure 19-31

Professional Visual Studio 2005 Team System
Professional Visual Studio 2005 Team System (Programmer to Programmer)
ISBN: 0764584367
EAN: 2147483647
Year: N/A
Pages: 220 © 2008-2017.
If you may any questions please contact us: