Reporting in TFS - Sample Chapter
Reporting in TFS - Sample Chapter
Reporting in TFS - Sample Chapter
ee
pl
e
P r o f e s s i o n a l
E x p e r t i s e
D i s t i l l e d
$ 29.99 US
19.99 UK
P U B L I S H I N G
Sa
Dipti Chhatrapati
Reporting in TFS
Reporting in TFS
Reporting in TFS
Create and customize reports in Team Foundation Server
using Excel and SQL Server Reporting Services
Dipti Chhatrapati
P U B L I S H I N G
Reporting in TFS
This book is your guide to mastering the comprehensive reports that are part of Team
Foundation Server and Microsoft's main Application Life Cycle Management (ALM)
suite. TFS Reporting provides the ability to track different metrics of development
projects throughout the Application Life Cycle; these include team progress, bugs,
the current backlog, test progress, and so on, using well-integrated and familiar tools
such as Excel and SQL Server Reporting Services. Team Web Access reports are also
explained in this book, providing a quick progress status view via different charts, work
item queries, as well as inbuilt reports. The book starts by giving you a walkthrough
of TFS and the reporting architecture. Then it jumps into the basics of Excel reporting,
describing each of the standard reports available. Finally, you will learn how to use the
powerful tools available in SQL Server Reporting Services to create and customize robust
reports and how to design and customize a dashboard featuring reports relevant to you.
Team Foundation
Server Primer
Team Foundation Server (TFS) is Microsoft's main tool to maintain development
projects within the project team. It provides the collaborating platform for a software
product. TFS also helps with maintaining source code with check-in/checkout and
code review functionalities, building and testing the application, planning and
tracking the work of team members, and so on. TFS is available as part of Microsoft's
primary development suite, Visual studio. It is available on various Visual Studio
editions such as Professional, Premium, Ultimate, and Test Professional. This chapter
promotes a basic understanding of TFS, Application Lifecycle Management (ALM),
and the TFS 2013 architecture.
Chapter objectives
This chapter covers the following topics:
[1]
TFS basics
TFS is a set of tools and processes that are used to plan, develop, build, test, deploy,
and maintain a software product. TFS forms the basis for Microsoft's Application
Lifecycle Management (ALM) initiative. It also has a cloud version in Azure named
Visual Studio Online (VSO), which is known as TFS Online and has slightly
different capabilities. VSO is a hub for project data on cloud, which can be up-andrunning in a few minutes without installing and configuring a single server. We can
connect to the project on cloud using the Visual Studio Development suite.
TFS ensures that the various software development methodologies and activities of
an application include the following:
Version Control
[2]
Chapter 1
Version control
TFS provides version control to enable a team to manage and track the source files
and documents in a project. It lets you to add not only code files but also documents,
to maintain the project's documentation.
TFS version control has the following most useful activities:
Managing versions
Branching
Shelving
Defect tracking
http://msdn.microsoft.com/en-us/library/
ms181368.aspx
http://msdn.microsoft.com/en-us/library/
hh994655.aspx
[3]
In short, TFS provides real-time visibility with customizable boards while continuously
monitoring the project status with flexible reporting. Agile tools are also available on
Visual Studio Online.
For more information on agile process planning, have a look at
the following link:
http://www.visualstudio.com/en-us/explore/
agile-software-development-vs.aspx
http://msdn.microsoft.com/en-us/library/
vstudio/ee889983.aspx
Processing build
TFS allows continuous or periodic generation of project builds. A TFS build consists
of the following activities:
Synchronizing sources
Compiling applications
Scheduling a build
In reality, TFS build server provides a way to define a build, which is then
compiled and tested. Build systems help catch bugs and other quality issues
during the development period and keep the code validated so that the
application performs better.
For more information on the build process, have a look at the
following links:
http://msdn.microsoft.com/en-us/library/
vstudio/ms181709.aspx
http://msdn.microsoft.com/en-us/library/
ms252495.aspx
[4]
Chapter 1
http://msdn.microsoft.com/en-us/library/
ms182409.aspx
http://msdn.microsoft.com/en-us/library/
jj635157.aspx
Reporting status
Reporting is a basic segment in TFS that uses a separate data warehouse to generate
the report. Tracking a team's work via reporting using work items, queries, builds,
source code, and test results, is mainly used to represent graphical charts in a TFS
report. Based on this report, we can make better decisions in order to drive the
project seamlessly. There are a number of templates available to create reports. TFS
can create custom reports as well. Every report depicts the status of the project,
quality of the software, or progress of the project, which in turn results in better
management of the software product throughout the team. We will discuss TFS
reporting in more detail in later chapters
Ultimately, TFS is a focal point for the Application Life Cycle Management (ALM).
It empowers the development team, project managers, and customers to effectively
engage in the development process via a single solution.
[5]
ALM practices
ALM's core practices are as follow:
Generating reports
Testing an application
The latest features of TFS 2013 and VSO empower team members to develop and
manage the project that result in the best experience across the platforms. Moreover,
additional ALM features help team members become more productive with
improved support of agile software development practices. Most businesses require
flawless synchronization of data across different ALM tools/solutions without losing
focus on the value of a corporate ALM strategy.
[6]
Chapter 1
Visual Studio Online (VSO) is also an ALM tool hosted in the cloud that has all the
features of an on-premise TFS, minus the administration headache associated with
an on-premise version.
Visual Studio Online (VSO) is a set of essential components on a cloud-based
service to write better code. It offers code browsing, code editing, repository
places to check-in /check out your code, build services, test case management,
and application insights.
Using Visual Studio Online (VSO), you can create team projects, choose a process
template that suits your project, and perform all the workflows associated with
Sprint Planning and Project Management using the Agile methodology. The core
capability of TFS 2013 is ALM, which has been evolving through various practices,
tools, and processes, as depicted in the following:
TFS 2013 is the first requirement in setting up the environment in order to follow
Application Lifecycle Management (ALM) practices and tools. It's designed to
integrate all artifacts across the software development life cycle. It simply includes
managing the source control and tracking work items that can be everything from
requirements to bugs. All these things can be wrapped using process templates such
as Scrum, CMMI, or custom ones, as required.
[7]
By considering the latest business trends, ALM focuses more on building the
application, measuring the application, and learning the application; this is called
as the BUILD-MEASURE-LEARN cycle.
As we develop software, we get continuous feedback that goes to the project team
and supplies insight into improving the project. Along with this, ALM can be broken
down in to four major areas: plan, develop, release, and operate, that continuously
adds value to the solution, as shown in the following screenshot:
[8]
Chapter 1
http://msdn.microsoft.com/en-us/library/
vstudio/fda2bad5(v=vs.120).aspx
http://channel9.msdn.com/Events/TechEd/
Australia/2013/DEV211
http://msdn.microsoft.com/en-s/library/vstudio/
ee889983.aspx
[9]
Hybrid Deployment, with TFS features as well as Visual Studio Online (VSO)
TFS on-premises
With TFS on-premises, we can extend the features and functionalities of the Team
Foundation by writing the application either on the client side or on the application
server. The TFS architecture is mainly divided into 4 parts:
Client side: By using a client object model, we can extend TFS capabilities
that relate to version control, tracking work items, and building on the
client side.
[ 10 ]
Chapter 1
Data tier: This includes data, stored procedures, and other associated logic.
The data tier consists of the following databases within a SQL server:
Configuration database
Application warehouse
Build machine: We can customize the build process using the build process
object model on a build machine that relates to creating build processes and
activities, as shown in the following TFS Architecture diagram:
[ 11 ]
For instance, TFS server hosts multiple team projects and each project will
have a repository that will have four branches such as Development, System
Integration Testing (SIT), User Acceptance Test (UAT), and Production, as
shown in the following team project hierarchy:
The code in the repositories resides in the data tier, which is accessible using
a client application stored on the client side through the application tier. For
each branch, you can configure one or more multiple build processes. These
builds requires a build server. We can have one build server for all the builds
or a separate build server for each repository; alternatively, it can be share a
build server between two repositories.
[ 12 ]
Chapter 1
In Visual Studio Online (VSO) deployment, the application tier, data tier, and build
server are hosted on the cloud via the Microsoft Cloud platform and SQL server
Azure technology.
[ 13 ]
Hybrid deployment
However, there are still arguments for having TFS on-premise and Visual Studio
Online (VSO). The following points are the main differences between TFS
on-premises and TFS on-cloud:
Feature
TFS on-premise
CodeLense Support
Application Insights
Simple installation
Team Foundation Server has customizable work items and process templates,
enterprise-level reporting, and incredible scalability. Visual Studio Online (VSO) has
elastic load testing, Application Insights, and deep integration with Azure. It looks
as if enterprises have to choose one or the other, but it's not always true. We can have
the advantage of both to add more power to Application Life Cycle Management.
There are various integration tools available for TFS and Visual Studio Online (VSO).
All are open source and you can choose one as per your requirements; they are
as follows:
ALM Rangers
[ 14 ]
Chapter 1
http://channel9.msdn.com/Events/TechEd/
NorthAmerica/2014/DEV-B363#fbid=
http://visualstudiogallery.msdn.microsoft.
com/eb77e739-c98c-4e36-9ead-fa115b27fefe
Warehouse adapters: These are manageable assemblies that fetch data from
operational stores and transform them into a standardized format that is
compatible with warehouse databases and writes them to the warehouse
relational databases.
Relational Databases: These have a schema that specifies the fields such as
dimensions, measures, and reporting data details. The data warehouse is
organized in a star schema, consisting of fact tables and dimension tables.
For example, the work item fact table has one row for every work item
stored in the work item operational store. Fact tables are a good source of
information for the reports and show the latest activity. A dimension table
stores the set of values that exists for given dimensions. Measures are the
values taken from operational data.
[ 15 ]
Reporting with Report Designer: This is a tool in Visual Studio that is used to
design the reports. Report Designer provides tabbed windows for data, layout
and preview, query builder, and an expression editor to create a report.
Excel Reports: TFS is integrated with Excel to manage projects and its reports
that use Microsoft Excel. Microsoft Excel provides pivot tables and charts to
view and analyze multidimensional data. You can bind these pivot tables
directly to the Team Foundation cube, so you can interact with the data in
the cube.
Security: TFS administers have access to the data in the data warehouse by
granting or revoking permissions on the user's account. By default, write
access to the warehouse is restricted to a service account under which the
warehouse service runs. A user who has permission to view the data in the
warehouse has full access to all of the data for all team projects in all team
project collections.
The following diagram shows the reporting architecture for TFS 2013:
[ 16 ]
Chapter 1
http://msdn.microsoft.com/en-us/library/
ff647430.aspx
http://msdn.microsoft.com/en-us/library/
bb649552.aspx
http://msdn.microsoft.com/en-us/library/
ms244687.aspx
http://blogs.msdn.com/b/jasonsingh/
archive/2013/03/27/tfs-reports-alm-means-theeveryone-from-your-vp-to-your-customer.aspx
Types of reports
TFS 2013 offers the following types of report, which we will look at in depth in
later chapters:
Work item queries: These are used to review or update work items.
Work item reporting: Custom work item reports are generated using
Microsoft Excel, the project server, and SSRS reporting tools.
Excel reports: There are a number of standard Excel reports available via the
selected process template while creating a team project; these reports can be
accessed via the SharePoint portal or Team Explorer's Document tab.
SSRS reports: There are a number of default reports available via the
selected process template with installed SSRS; these can be accessed via Web
Access, SharePoint or Team Explorer.
Team Web Access reports: TFS 2013 has excellent chart and standard reports
that show a visual representation of work items. It can be accessed via Team
Web Access.
Light weight reports: TFS 2013 introduced a new feature called light
weight reporting that provides the ability to create real-time reports
based on query results and does not rely on the warehouse or cube.
It offers real-time Burndown charts, velocity, and CFD diagrams directly
within Team Web access.
[ 17 ]
SQL queries: Major reports in TFS display information from the analysis
service OLAP cube. However, running T-SQL queries directly against
relational databases provides the facility to create more granular-level
custom reports.
TFS API: This provides binaries to create a custom report using only a few
lines of C# code.
REST API: Currently, this API is only available in Visual Studio Online
(VSO) and is an implementation of OData Protocol. The REST API makes
it dramatically easier to integrate Visual Studio Online (VSO) with other
web-based tools and to access VS Online from any mobile device,
irrespective of whether they are third-party commercial tools or custom
ones you are building.
Summary
In this chapter, we reviewed the basics of TFS Architecture and Reporting. We also
reviewed the importance of Application Life Cycle Management. In the next chapter,
we will emphasize on creating work item reports from queries.
[ 18 ]
www.PacktPub.com
Stay Connected: