58
HP Application Lifecycle Intelligence For the HP ALM Platform Software Version: 2.0 For ALM 11.00, SP2 or later User Guide Document Release Date: April 2014 Software Release Date: February 2014

HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Embed Size (px)

Citation preview

Page 1: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

HP Application Lifecycle IntelligenceFor the HP ALM Platform

Software Version: 2.0

For ALM 11.00, SP2 or later

User Guide

Document Release Date: April 2014

Software Release Date: February 2014

Page 2: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Legal Notices

WarrantyThe only warranties for HP products and services are set forth in the express warranty statementsaccompanying such products and services. Nothing herein should be construed as constituting anadditional warranty. HP shall not be liable for technical or editorial errors or omissions containedherein.

The information contained herein is subject to change without notice.

Restricted Rights LegendConfidential computer software. Valid license from HP required for possession, use or copying.Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer SoftwareDocumentation, and Technical Data for Commercial Items are licensed to the U.S. Governmentunder vendor's standard commercial license.

Copyright Notice© Copyright 2003 - 2014 Hewlett-Packard Development Company, L.P.

Trademark NoticesAdobe™ is a trademark of Adobe Systems Incorporated.

Microsoft® andWindows® are U.S. registered trademarks of Microsoft Corporation.

UNIX® is a registered trademark of TheOpenGroup.

HP Application Lifecycle Intelligence (2.0)Page 2 of 58

User Guide

Page 3: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Documentation UpdatesThe title page of this document contains the following identifying information:

l Software Version number, which indicates the software version.

l Document Release Date, which changes each time the document is updated.

l Software Release Date, which indicates the release date of this version of the software.

To check for recent updates or to verify that you are using themost recent edition of a document, goto:

http://h20230.www2.hp.com/selfsolve/manuals

This site requires that you register for an HP Passport and sign in. To register for an HP PassportID, go to:

http://h20229.www2.hp.com/passport-registration.html

Or click theNew users - please register link on the HP Passport login page.

You will also receive updated or new editions if you subscribe to the appropriate product supportservice. Contact your HP sales representative for details.

HP Application Lifecycle Intelligence (2.0) Page 3 of 58

User Guide

Page 4: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

SupportVisit the HP Software Support Online web site at:

http://www.hp.com/go/hpsoftwaresupport

This web site provides contact information and details about the products, services, and supportthat HP Software offers.

HP Software online support provides customer self-solve capabilities. It provides a fast andefficient way to access interactive technical support tools needed tomanage your business. As avalued support customer, you can benefit by using the support web site to:

l Search for knowledge documents of interest

l Submit and track support cases and enhancement requests

l Download software patches

l Manage support contracts

l Look up HP support contacts

l Review information about available services

l Enter into discussions with other software customers

l Research and register for software training

Most of the support areas require that you register as an HP Passport user and sign in. Many alsorequire a support contract. To register for an HP Passport ID, go to:

http://h20229.www2.hp.com/passport-registration.html

To findmore information about access levels, go to:

http://h20230.www2.hp.com/new_access_levels.jsp

HP Application Lifecycle Intelligence (2.0)Page 4 of 58

User Guide

Page 5: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

ContentsContents 5

Welcome to Application Lifecycle Intelligence 8

Setting Up ALI 11Prerequisites for ALI 12

The Installation Process 12

Deploying the ALI Extension 12

Enabling the ALI Extension 13

Upgrading Projects 13

UpgradingWork Items 14

Undeploying the ALI Extension 14

PerforceMigration 15

Configuring the ALI Scheduler 15

SCM System Integration 17Supported SCM Systems 18

SCM Agents 19

Configuring Repositories 19

Adding Repositories 20

Setting External Repository Viewer 21

Setting Commit Patterns 23

Associating Code Changes With Alternative Identifiers 25

Setting Branches and Enforcement 26

Setting Branches 27

Setting Check-in Policies 27

Setting Locking Policies 28

Setting Change Detection 29

Build System Integration 30Supported Build Systems 31

Hudson/Jenkins Installation 31

HP ALI Hudson/Jenkins Plugin Installation 32

HP Application Lifecycle Intelligence (2.0) Page 5 of 58

User GuideContents

Page 6: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

HP ALI Hudson/Jenkins Plugin Configuration 32

TFS Build Server 33

Adding a Build Server 34

Adding Build Configurations 35

Reusing SCMConfigurations from Build Configurations 36

Setting Build Configuration Defect Filters 36

Customizing ALI Project Lists 37

Setting Build Server Detection 38

Force.com Integration 39Project Deployment, Testing and Report Generation 39

Hudson/Jenkins Force.com Configuration 41

TFS Integration 43

Monitoring SCM Changes and Traceability 45Viewing the Code Change Table 46

Code Change Details 46

Viewing Change Impact Report 47

Generating Project Reports 47

Generating Graphs 48

Monitoring Development Activity 50Development Activity Releases 51

Development Activity Defects 51

Development Activity Requirements 51

Monitoring Development Activity in Defect Details 52

Monitoring Build Activity 53Viewing Builds 54

Build Details 54

Requirements Tab 55

Defects Tab 55

Code Changes Tab 55

Active Developers Tab 56

Build Reports 56

HP Application Lifecycle Intelligence (2.0)Page 6 of 58

User GuideContents

Page 7: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Generating Build Graphs 56

HP Application Lifecycle Intelligence (2.0) Page 7 of 58

User GuideContents

Page 8: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Welcome to Application LifecycleIntelligence

Application Lifecycle Intelligence (ALI) is a set of capabilities, reports andmetrics providingcomplete ALM traceability that enables ALM stakeholders tomake informed decisions.

ALI extends the HP ALM platform model with Source CodeManagement (SCM) and BuildManagement integration and establishes linkage between ALM Entities (Releases, Requirements,Defects …), code changes, builds, unit test results and code coverage analysis. This transformsHP ALM into the central system of record that provides information about both business anddevelopment activities.

Control changes committed to SCM

With ALI, it is possible to define SCM policies that control committed changes. The enforcement ofthe SCM policies helps to ensure that developers follow prescribed guidelines and best practices.Team leaders will be confident that developers implement the right features and add requiredmetadata to the committed code changes. Policy enforcement also provides invaluable help duringstabilization periods as it is easy to ensure that developers fix only severe defects or to lock thecode base of a release completely.

For details, see "Setting Branches and Enforcement" on page 26.

Developers, QA managers and Project Managers can easily review:

l Code changes implementing a requirement or defect.

l Code changes implemented in specific builds.

l What specifically was implemented during a specific time period, release, build or by anindividual contributor.

l Which requirements and defects are affected.

l Amount of changes associated with a particular requirement .

l Line by line differences in code changes.

l Changes not associated with either requirements or defects.

l Build & Quality metrics.

l Aggregated information about code coverage, test results and amount of changes.

For details, see "Monitoring SCMChanges and Traceability" on page 45, "Monitoring DevelopmentActivity" on page 50 and "Build Details" on page 54.

HP Application Lifecycle Intelligence (2.0)Page 8 of 58

User GuideWelcome to Application Lifecycle Intelligence

Page 9: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Application Lifecycle Intelligence enables this ALM traceability by integrating ALM requirements,tests and defects with popular open source and commercial SCM, Build System, Unit Testing andCode Coverage Analysis tools.

ALI 2.0 provides integration with:

l SCM Systems

n Subversion (SVN)

n Concurrent Versions System (CVS)

n Microsoft Team Foundation Server (TFS)

n Perforce

The integration is SCM client agnostic; developers can commit changes from their current SCMclients whether it is a command line utility or an IDE like Eclipse with the Tasktop plugin. Fordetails, see "Supported SCM Systems" on page 18.

l Build Systems

n Jenkins

n Hudson

n Microsoft Team Foundation Server (TFS)

ALI provides plug-ins for build servers that automatically extract build information andmetricsand embed them into the ALMmodel. For details, see "Supported Build Systems" on page 31.

l Unit Testing

n JUnit

n TestNG

n NUnit

l Code Coverage Analysis

n Cobertura

n NCover

Note: This guide explains how to work with Application Lifecycle Intelligence in conjunction withALM. For more information on using ALM, refer to theHP Application Lifecycle Management UserGuide.

HP Application Lifecycle Intelligence (2.0) Page 9 of 58

User GuideWelcome to Application Lifecycle Intelligence

Page 10: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

HP Application Lifecycle Intelligence (2.0)Page 10 of 58

User GuideWelcome to Application Lifecycle Intelligence

Page 11: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 1

Setting Up ALIThis chapter describes the installation requirements and setup procedures for using ApplicationLifecycle Intelligence (ALI).

l If upgrading from Application Lifecycle Intelligence 1.1 to 2.0, see "PerforceMigration" onpage 15.

l If you are upgrading from ALI 2.0.0.137612 or earlier, and you were working with the TFSintegration, see the upgrade section of "TFS Integration" on page 43. (To view the version ofALI that you are working with, from the ALMmainmenu, select Help > About ApplicationLifecycle Intelligence Software.

This chapter includes:

Prerequisites for ALI 12

The Installation Process 12

Deploying the ALI Extension 12

Enabling the ALI Extension 13

Upgrading Projects 13

UpgradingWork Items 14

Undeploying the ALI Extension 14

PerforceMigration 15

Configuring the ALI Scheduler 15

Page 11 of 58HP Application Lifecycle Intelligence (2.0)

Page 12: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Prerequisites for ALITo use ALI, the followingmust be installed:

l ALM Edition of HP Application Lifecycle Management 11.00 SP2 or later (on server machine)

Theminimum system requirements to run ALI are the same as for ALM Platform, as described intheHP Application Lifecycle Management Installation Guide.

ALI also requires SCM and build systems to integrate with. For details, see "Supported SCMSystems" on page 18 and "Supported Build Systems" on page 31.

The Installation ProcessThis section describes the ALI installation process.

To install ALI:

1. Ensure that ALM Platform 11.00 is installed on your server machine.

For more information on installing ALM Platform, refer to the HP Application LifecycleManagement Installation Guide .

2. Install Application Lifecycle Management 11.00 SP2 on your server machine.

a. Visit the HP Software Support Web site at http://www.hp.com/go/hpsoftwaresupport .

b. Under Where do I find, click Software patches and download the patch.

c. Follow the on-screen installation instructions.

3. Deploy the ALI extension on your server machine. For details, see "Deploying the ALIExtension" below for details

4. Enable the ALI extension in ALM Site Administration for every project that requires ALI.

For details, see "Enabling the ALI Extension" on the facing page

Deploying the ALI ExtensionTo deploy the ALI extension:

Download the ALI_EXTENSION.qcx file from the add-in page.

On the ALM Platform machine, run the HP ALM Extension Deployment Wizard, select the ALI_EXTENSION.qcx file and follow through the wizard. The deployment tool validates extension (.qcx)files and updates archive (.war) files that can then be deployed to the application server. Oncedeployed, changes to the archive files take effect.

HP Application Lifecycle Intelligence (2.0)Page 12 of 58

User GuideChapter 1: Setting Up ALI

Page 13: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

If using a JBoss application server:

l The tool automatically deploys the archive files (ALM and extension .war files).

l By default, the tool starts JBoss when complete.

When using another application server, deploy ALMmanually after the tool is finished. The tooldisplays the location of the archive files (by default the HP/ALM/deployment/qcbin.war folder).Restart ALM after deploying these files.

For more details on running the Extension Deployment Tool, refer to theHP Application LifecycleManagement Installation Guide andHP ALM Extension Deployment Tool Readme.

Enabling the ALI ExtensionAfter deploying ALI on the ALM Platform, the extensionmust be enabled. It may be enabled foreither a new project or an existing one.

Before enabling the ALI extension, consider the following points:

l You cannot disable an extension for a project after you enable it.

l If the project is active, youmust deactivate it before enabling an extension. After the extensionhas been enabled, you can reactivate the project.

l Enabling extensions for a project can take some time.

To enable the ALI extension for a project:

1. In Site Administration, click theSite Projects tab.

2. If relevant, create a new project in ALM in which to enable the extension. For details oncreating ALM projects, refer to theHP Application Lifecycle Management Administrator Guide.

3. In the Projects list, select a project. In the right pane, click theProject Extensions tab. TheExtensions list is displayed, listing extensions installed on the ALM Platform for which youhave a license.

4. For theALI extension, select theEnable checkbox. Click Yes to confirm

Upgrading ProjectsIf you worked with ALM projects on previous versions of the ALI extension, youmust upgrade thoseprojects to work with the current version.

To upgrade a project:

HP Application Lifecycle Intelligence (2.0) Page 13 of 58

User GuideChapter 1: Setting Up ALI

Page 14: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

1. It is strongly recommended that you backup your original project before the upgrade.

2. Enter the Site Administration and click theSite Projects tab.

3. In theProjects list, select a project.

4. Click theExpand the Maintain Project button and select Upgrade Project.

5. Read the guidelines in the wizard and click Upgrade Project. The Upgrade Project windowdisplays the results.

If using Perforce, you will need to reload your data. For details, see "PerforceMigration" on thefacing page .

If you used the ALI extension prior to version 2.0.0.128336, youmust manually upgrade work itemfields. For details, see "UpgradingWork Items" below. Note: To identify the ALI version you areworking with, from themain ALMmenu, select Help > About.

For more information on upgrading projects, refer to theUpgrading Projects section in theHPApplication Lifecycle Management Administrator Guide.

Upgrading Work ItemsIf you are upgrading Application Lifecycle Intelligence to version 2.0.0.128336 or later, youmustmanually upgrade the SYSTEM_FIELD project table. This is required to prevent a performanceissue in the Requirements and Defects modules whenmoving between entities.

To apply the work item fix to existing projects:

Note: The scripts described below are located in the ALI bundle in the following folder:resources\work-items-update-scripts. It is recommended to use your database console forthese updates.

l For each project with the ALI extension enabled, you should verify whether the has-changeset-linkage fields exist. Use the following script: check-existence-of-has-changeset-linkage-fields.sql.

If the field does not exist, (execution of this script results with 0), run the following script: add-has-changeset-linkage-fields.sql.

l If you have downgraded the ALI extension to version 2.0.0.126629 or earlier, it is stronglyrecommended to remove the has-changeset-linkage fields. Use the following script for eachproject with the ALI extension enabled: remove-has-changeset-linkage-fields.sql.

Undeploying the ALI ExtensionTo undeploy ALI extensions:

HP Application Lifecycle Intelligence (2.0)Page 14 of 58

User GuideChapter 1: Setting Up ALI

Page 15: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

On the ALM Platform machine, run the HP ALM Extension Undeployment Wizard, and select theextensions to undeploy.

For details on running the Extension Undeployment Wizard, refer to the HP ALM ExtensionDeployment Tool Readme.

Perforce MigrationIf upgrading from Application Lifecycle Intelligence 1.1 to version 2.0, themigration of Perforce datahandled by ALM requires removing the current data and reloading them from Perforce.

To migrate all data from Perforce SCM perform the following steps on each Perforcerepository:

1. From theManagement module, select SCM Repositories and choose the Perforce repository.

2. From the Repositories menu select Cleanup and select a date that removes themost recentcommit.

3. Go to the Branches tab and for each branch:

a. Select branch details.

b. Delete the Last Change Read value.

4. From the Change Detection tab start the synchronization.

Configuring the ALI Scheduler

Note: This functionality applies to ALI version 2.0.0.128336 or later.

ALI detects changes made on preconfigured SCM repositories and build servers, loads informationabout code changes and associated file builds and build artifacts to the ALM server, andautomatically creates traceability between loaded code changes, builds, and work items(requirements, defects).

At regular intervals, the ALI scheduler runs discovery on all ALI enabled projects, and synchronizeseach project. If synchronization of a project ranmore recently than the predefined synchronizationinterval, the synchronization is not performed again.

By default, themaximum number of synchronization jobs that may run at the same time is limited to5. In case you want to change this value be careful. It can cause the performance issue on yourserver.

You can configure the behavior of the ALI scheduler by setting the following ALM SiteAdministration parameters. Log in to Site Administration and click theSite Configuration tab.

You can either add or edit the following parameters. If the parameters do not exist, the defaultvalues are used.

HP Application Lifecycle Intelligence (2.0) Page 15 of 58

User GuideChapter 1: Setting Up ALI

Page 16: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Caution: Take care when changing the default values. Improper scheduling can cause aperformance issue on your server.

l ALI_MAX_PROJECT_SYNC_JOB. Themaximum number of synchronization jobs that mayrun at the same time. The default value is 5.

l ALI_PROJECT_SYNC_DISCOVERY_INTERVAL. The interval between checks to determineif any project requires synchronization. The default value is 10minutes.

l ALI_MIN_PROJECT_SYNC_PERIOD. Theminimum time interval that must pass betweensynchronizations for a project. The precise time depends on amount of synchronized projectsand synchronization jobs. The default value is 60minutes.

For example:

1. ProjectA was synchronized at 11:30.

2. Changes weremade to ProjectA at 11:45.

3. The scheduler runs a discovery check at 12:00. Result: Synchronization is not performedfor ProjectA.

4. ProjectA is going to be synchronized at 12:30 if there is free synchronization jobavailable.

For more information on setting ALM configuration parameters, refer to the Setting ALMConfiguration Parameters section in theHP Application Lifecycle Management AdministratorGuide.

HP Application Lifecycle Intelligence (2.0)Page 16 of 58

User GuideChapter 1: Setting Up ALI

Page 17: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 2

SCM System IntegrationThis chapter includes:

Supported SCM Systems 18

Configuring Repositories 19

Setting Branches and Enforcement 26

Setting Change Detection 29

Page 17 of 58HP Application Lifecycle Intelligence (2.0)

Page 18: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Supported SCM SystemsApplication Lifecycle Intelligence (ALI) supports Subversion, Perforce, and CVS systems natively.No additional installations are required to load code changes from these systems unless commitmessage policy enforcement with a pushmechanism is required. If pushmechanisms are required,SCM agents need to be installed on the SCM System. For details, see "SCM Agents" on the facingpage.

TFS systems are supported natively as well. However, for full support of TFS systems, youmustinstall TFS agent web services. One of the web services is designed to count the number ofchanged lines. You should install it even if you do not require pushmechanism support. Without theTFS agent web services, all code changes are displayed with “0” in the changed lines field.

Note: ALI no longer supports the TFS over SvnBridgeSCM repository integration.

The TFS over SvnBridgeSCM repository integration will continue to be delivered within theALI extension, but is no longer tested or supported.

It is highly recommended that you use the native TFS integration instead. It provides a simpler,seamless, and native integration with Microsoft Team Foundation Server. For details onswitching to native TFS support, see "TFS Integration" on page 43.

Supported SCM Systems

ALI provides support for following SCM systems:

l Subversion Versions: 1.5.*, 1.6.*, 1.7.* (Tested on 1.5.5, 1.5.6, 1.6.1, 1.6.15, 1.7.3, 1.7.4)

l CVS Versions: 1.11.*, 1.12.* (Tested on 1.11.23, 1.12.13)

l TFS Versions: Team Foundation Server 2010, 2012 (Tested on TFS 2010, 2012)

l Perforce Version 2010.2, 2011.1, 2012.1 (Tested on 2011.1, 2012.1)

The SCM agents support deployment to the following operating systems:

l RedHat Enterprise Linux 5.x (32bit, 64bit)

l SuSE Linux Enterprise 11.x (32bit, 64bit)

l Windows 2003/2008 Server (32bit, 64bit)

Prerequisites:

MS PowerShell 2.0 or later must be installed onWindows and enabled to run scripts. Linux/Unixagent scripts use BASH. The BASH versionmust be 4.0 or later to support pushing into multiplerepositories.

HP Application Lifecycle Intelligence (2.0)Page 18 of 58

User GuideChapter 2: SCM System Integration

Page 19: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

SCM AgentsThe agent is a name for applications related to appropriate SCM systems required for pushmechanisms. The agent is a set of scripts or proprietary applications installed on a SCM serverconfigured for listening on a SCM system. When a change is committed to a configured repositoryand branch, the agent checks the policies and pushes the code change to the ALM server if thecommit is allowed.

Instructions on how to configure SCM agents can be found in the readme.txt file found in thespecific agent archive inside themain ALI distribution archive.

SVN Agent for Linux

agents\scm-integration\unix-linux\scm-agent-subversion.tgz

SVN Agent for Windows

agents\scm-integration\windows\scm-agent-subversion.zip

CVS Agent for Linux

agents\scm-integration\unix-linux\scm-agent-cvs.tgz

CVS Agent for Windows

agents\scm-integration\windows\scm-agent-cvs.zip

HP ALI TFS Services for Windows

agents\scm-integration\windows\ali-tfs-services.zip

Perforce Agent for Linux

agents\scm-integration\unix-linux\scm-agent-perforce.tgz

Perforce Agent for Windows

agents\scm-integration\windows\scm-agent-perforce.zip

For details, see "Setting Change Detection" on page 29

Configuring RepositoriesTo enable Application Lifecycle Intelligence (ALI) to load code changes from SCM systems and tostart the automated traceability of work items (requirements/defects), code changes and definedreleases, SCM repositories must be configured.

This section includes:

Adding Repositories 20

Setting External Repository Viewer 21

Setting Commit Patterns 23

Associating Code Changes With Alternative Identifiers 25

HP Application Lifecycle Intelligence (2.0) Page 19 of 58

User GuideChapter 2: SCM System Integration

Page 20: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Adding RepositoriesALI supports Subversion, Perforce, CVS, and TFS. For details, see "Supported SCM Systems" onpage 18.

To add a repository:

1. Log in to ALM with Administrator privileges and under theManagement tab, click SCMRepositories to open the Repositories page.

2. Click New Repository, and from the drop-down list, select an SCM type and click OK.

3. In the New SCMRepository window, enter a name for the repository, a location, and ausername and password if required.

Note: The location is a full path to the repository such as http://host/svn/repo etc..Check with your system administrator if unsure what this value should be.

Perforce: ALI repositories are equivalent to Depots. The location of the repository shouldconsist of a host name and port of the Perforce Server and Depot name. The format should besimilar to host:port//depot_name.

Subversion: The repository locationmust point to the actual repository root. Branches arelater used for specifying paths within the repository. In the case that an SVN URL has anunknown root, use the "svn info <URL>" command to find the root.

TFS: ALI repositories are equivalent to TFS Project Collections. The location of the repositoryshould consist of the host name and port of the TFS Server, and the name of the ProjectCollection. The format should behttp://tfsServer:tfsport/tfs/ProjectCollectionName.

CVS: Fill the alias property with whole CVSROOT (e.g.:pserver:username:password@host/cvsrepo) exactly as it is configured in your buildsystem. The CVSRoot property is mandatory for the pserver protocol.

4. If any of the repository properties require modification, select a property and click theEditProperty button to open theEdit Propertywindow and add a value. Click OK after enteringthe required value.

Note:

CVS:CVS repositories require the CVS protocols pserver and initial date to start loadingcode changes. The CVS root should also be specified, but it is not mandatory.

TFS: If the line count service URL is different than the default valuehttp://tfsServer:tfsPort/tfsali/Service/LineCountService.svc, thenthe line count service URL should be provided. If it is not set, the branch is created with

HP Application Lifecycle Intelligence (2.0)Page 20 of 58

User GuideChapter 2: SCM System Integration

Page 21: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

warnings and all loaded code changes are stored with 0 changed lines. The previousservice, CountLinesService.svc, is not supported as of ALI version 2.0.0.139876. Theline count service is part of the ALI TFS SCM agents which you download and install onthe TFS Server. The HP ALI TFS Services are part of the ALI bundle.

5. Click Submit. ALI tests the connection to the repository before adding it to the list.

Change detection and commit pattern options may be set when adding the repository.

For details, see "Setting Change Detection" on page 29 and "Setting Commit Patterns" on page 23.

Setting External Repository ViewerALI provides a built-in repository viewer for viewing files’ diffs and details with no additionalconfiguration required. You can also use a preferred repository browser such as ViewVC.

The following properties are entered when configuring an SCM repository or can be changed fromthe details tab of an existing repository.

Template for diff links - template for a link pointing to a diff view of a given file in a repositoryviewing system (e.g. ViewVC). Allows you to create links from the ALI code changes table in theUI. Each file in the code change contains a link displaying a diff view (revision in current codechange to its previous revision). The template can contain tags/variables which are expanded at runtime from the context of the currently selected code change in the UI.

Tags/Variables that may be substituted/expanded:

${filePath} ... path of file within repository.

${revision} ... revision in current code change.

${fromRevision} ... previous revision to revision in current code change.

${fromFilePath} ... in case of copying/moving its source location.

Note: The following address enables you to view the diff of two files stored in:

TFS 2010:

http://tfshost:tfsport/tfs/_COLLECTION_/web/diff.aspx?opath={originalItemPath}&ocs={originalItemChangeset}&mpath={modifiedItemPath}&mcs={modifiedItemChangeset}

TFS 2012:

http://tfshost:tfsport/tfs/_COLLECTION_/_versionControl/changesets#opath=${fromFilePath}&oversion=${fromRevision}&mpath=${filePath}&mversion=${revision}&_a=compare

Where:

• tfshost: address of the TFS server

HP Application Lifecycle Intelligence (2.0) Page 21 of 58

User GuideChapter 2: SCM System Integration

Page 22: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

• tfsport: port where TFS server is running

• _COLLECTION_: name of the collection where the requested file's project is amember

• opath: full path to the original source file (including '$' symbol and project name) e.g.$/ali-replica/alik/pom.xml

• ocs: TFS original code change ID

• oversion: TFS original code change ID

• mpath: full path to themodified source file (including '$' symbol and project name) e.g.$/ali-replica/alik/pom.xml

• mcs: TFS modified code change ID

• mversion: TFS modified code change ID

Template for file links - template for a link pointing to a file view of a given file in a repositoryviewing system (e.g. ViewVC). Allows you to create links from the ALI code change table in the UI.Each file in the code change contains a link displaying file view (file text content of a given revisionin the scope of current code change). The templatemay contain tags/variables which are expandedat runtime from the context of the currently selected code changein the UI.

Tags/Variables that may be substituted/expanded:

${filePath} ... path of file within repository.

${revision} ... revision in current code change.

Note: The following address enables you to view the source of files stored in TFS:

TFS 2010:

http://tfshost:tfsport/tfs/_COLLECTION_/web/view.aspx?&path={itemPath}&cs={itemChangeset}

TFS 2012:

http://tfshost:tfsport/tfs/_COLLECTION_/_versionControl/changesets#cs=${revision}&path=${filePath}&version=${revision}&_a=contents

Where:

• tfshost: address of the TFS server

• tfsport: port where TFS server is running

• _COLLECTION_ : name of the collection where the requested file's project is amember

• path: full path to the source file (including '$' symbol and project name) e.g.$/alireplica/alik/pom.xml

• cs: TFS code change ID

HP Application Lifecycle Intelligence (2.0)Page 22 of 58

User GuideChapter 2: SCM System Integration

Page 23: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

• version: TFS code change ID

Setting Commit PatternsDetecting andmaintaining traceability between code changes and requirements/defects is basedon a commit message provided when committing a change to the SCM system. ALI providescustomizable mechanisms that accommodate customizable allowance patterns The purpose is totransfer requirement or defect IDs within themessage the user enters when committing the code.

Commit Pattern settings can be accessed while setting up a new repository in theCommit Patternview, or by clicking on theCommit Pattern tab of an existing repository.

Patterns can be defined in eitherBasic orAdvancedmode.

Basic:

1. Add keywords for Defects or Requirements by clicking theAdd button, entering a value andclickingOK. Provided keywords mark a commit as related to either a defect or a requirement.

To associate code changes with alternative identifiers, such as IDs from an external trackingtool, see "Associating Code Changes With Alternative Identifiers" on page 25.

2. Add Prefix IDs to the pattern by typing in the ID number. Clicking the radio buttonmakes themoptional.

3. Click theMore Options button add the following options:

l Include Default Tasktop Commit Pattern – switched on by default. When Taskop plugin isintegrated with ALM, Tasktop generates default commit messages according to a pattern that isrecognized by ALI.

l Case Sensitivity Commit Messages – switched off by default. Switch on when you want toenforce case sensitivity on commit messages.

l Multiple Defects or Requirements separation markup – this markup is recognized as aseparator in the case of a commit message containingmultiple defects or requirements.

l Keyword location in commit message – keyword will be recognized only at the beginning ofthe commit message or anywhere within themessage.

l User commit message separator – separator between user commit message followed bydefects or requirements keywords.

n Example of options in a commit message:

fixing defect #100, #101: fix caching and enhance functionality

fixing defect = defect keyword

#100 = defect ID prefix and defect ID

HP Application Lifecycle Intelligence (2.0) Page 23 of 58

User GuideChapter 2: SCM System Integration

Page 24: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

“.” = multiple defects separator

“:” = user commit message separator

fix caching and enhance functionality = user commit message

4. Navigate away from the tab to commit the configuration.

Advanced:

1. Add to or change the default code pattern.

2. Test themodified code by clicking Test Against Existing Commits.

a. Case Sensitive enforces case sensitivity for messages.

3. Optionally test a Custom Commit Message by typing it into the field.

4. Navigate away from the tab to commit the configuration.

TheRestore Defaults button removes any changes and replaces the default keywords.

Several basic examples of advanced configurations:

1. Example 1

a. Pattern

([fixing] REGEX('defects?') IDLIST(DEFECT) | [implementing] REGEX('requirements?')IDLIST(REQ) ) : TEXT

b. Examplemessage:

"fixing defect #56721: something really serious was fixed"

"defects #57893,#61432: division by zero"

"requirement #1: domains"

2. Example 2

a. Pattern

(UNTIL(RE '((BUG)|(REQ))#') (IDLIST(DEFECT lead='((BUG)?#)?' sep=',' ) | IDLIST(REQ lead='((REQ)?#)?' sep=',' ) ) ){0,} [TEXT]

b. Examplemessage:

"This commit fixes BUG#1,#2 and implements REQ#4,REQ#5 makingthe product faster (resolving BUG#7)."

c. This patternmatches all inputs and extracts of any found 'BUG#' and 'REQ#' patterns.

HP Application Lifecycle Intelligence (2.0)Page 24 of 58

User GuideChapter 2: SCM System Integration

Page 25: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Such an open patternmay not be suitable for enforcing common policy, but it can be usefulwhen data from legacy repositories are loaded in the "read-only" mode, e.g. for reportingpurposes.

3. Example 3

a. Tasktop Pattern

(LISTITEM('Bug Status') - WORD IDLIST(DEFECT lead='DEF' sep='') | Incomplete -WORD IDLIST(REQ lead='REQ' sep='')) : TEXT

b. Matches default Tasktopmessages as:

"OPEN - task DEF10: http://host:9090/qcbin;DEFAULT;ALI_DEV-DEF10"

"Incomplete - task REQ42: http://host:9090/qcbin;DEFAULT;ALI_DEV-REQ42"

Associating Code Changes With Alternative IdentifiersBy default, you can link code changes to ALM requirements or defects based on their ALM entityIDs. If youmaintain another set of identifiers for your requirements or defects, you can associatecode changes with these alternative identifiers.

For example, if you synchronize your projects with an external defect tracking tool, you canreference the identifiers generated by that tool in your commit messages. ALM can then use thealternative identifier to link the code change to an ALM requirement or defect.

To associate code changes with alternative identifiers:

1. Prerequisites:

a. The alternative IDs must be stored in an ALM user-defined field. The supported field typesareNumber andString.

b. The alternative ID must be unique. The code change is linked to the first matching ALMentity.

2. In the SCMRepositories module, select a repository and click the Commit Pattern tab. Makesure theBasic view is selected.

3. In the Defects or Requirements section, click Add.

4. In theAdd keyword dialog box:

a. In theKeyword field, enter a keyword or phrase to indicate that the commit message isusing an alternative identifier. For example, Resolve Jira issue. Developers must

HP Application Lifecycle Intelligence (2.0) Page 25 of 58

User GuideChapter 2: SCM System Integration

Page 26: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

include this keyword or phrase in their commit messages.

b. In the Field list, select the user-defined field that stores the alternative identifiers.

When a commit message contains the keyword or phrase defined here, ALM looks at the user-defined field to locate the entity you want to associate with the code change.

Setting Branches and EnforcementBranches are set from theBranches tab of any existing repository. A Branch is a separate line of arepository that exists independently of other lines.

A branch needs to be associated with a release and then change detection options can be set tomake the changes visible in the Code Changes table in the form of a code change.

Commit Patterns may also be set in order to allow or disallow users from commiting changes to thebranch unless meeting specified criteria.

Policy enforcement is in place when there is an agent configured for the SCM repository.

For more information about agents, see "SCM Agents" on page 19.

This section includes:

Setting Branches 27

Setting Check-in Policies 27

Setting Locking Policies 28

HP Application Lifecycle Intelligence (2.0)Page 26 of 58

User GuideChapter 2: SCM System Integration

Page 27: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Setting BranchesTo add a new branch:

1. Go to theBranches tab and click add.

2. Provide a path name for the branch and optionally aBranch and a Last Change Read property.

CVS: A Branch name only has meaning for someCVS repositories. Do not fill in this propertyfor SVN. The Last Change Read field is either the last revision in the case of SVN or the date-time for CVS of which the code changes are read. Leave these fields empty if reading all codechanges from the given branch is required.

Perforce:Set the branch path without the Depot name. For example, if the branch is located at//depot/HelloWorld/releases/release-1.0/... then the path should be/HelloWorld/releases/release-1.0. Do not set the parameter branch even thoughthe branch is named.

TFS:Set the branch path to the project path without '$'. For example, if the project is located in'$/TestApp' , then the branch path should be '/TestApp'. The branch pathmust contain onlythe name of the project. A path containing subfolders is not supported.

3. Click Submit to test the link and add the branch.

To associate a branch with a release:

1. Open the SCM Branch Details window by either clicking on the path of the branch or theDetails button.

2. Click theAdd button and check the radio button for the required release in the drop downmenu

3. By default, the start date and end date is taken from the release and these can be changed byclicking in the date field and typing in a required date.

Code changes from the branch in the given time period are associated with the specifiedrelease. These code changes are visible in the Code Changes module when selecting thespecified release. More releases can be specified for the branch but typically in a different timeperiod.

Setting Check-in PoliciesTo specify check-in policies for the branch where you want to enforce commits:

1. Click Enforcement in the left hand pane of the SCM Branch Details window.

2. Select from the following options:

HP Application Lifecycle Intelligence (2.0) Page 27 of 58

User GuideChapter 2: SCM System Integration

Page 28: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

n Commit message must match defined pattern on theCheck-in Policies tab causescommits for which the commit message doesn’t match the predefined pattern to be refusedby the agent.

n Code change refers to a Requirement enforces that every commit must refer to anexisting requirement.

o Has Requirement Type orHas Priority and picking the types and/or priorities from thedrop downmenus so commits allow only changes associated with a specific requirementtype or priority.

n Code change refers to a Defect enforces that every commit must refer to an existingdefect.

o With severity of and selecting the severity levels required allows only changesassociated with a specific severity.

n Add this note to the System message sends custom systemmessages that informs auser when a commit is blocked with the applied note.

3. Click OK.

Note: The check-in policy feature requires the installation of an agent in order to function. Fordetails, see "SCM Agents" on page 19.

Setting Locking PoliciesTo specify locking policies for the branch where you want to enforce commits:

1. On the Locking Policies tab you canmanage locking policies associated with the branch.

2. Select from the following options:

n Disallow commits except for the following disallows all the commits coming to the givenbranch other than the following exceptions:

o A list of users allowed to commit to the branch can be specified though the branch islocked by applying the user name(s) of SCM users who are permitted to commit.

o A list of defects specified for which committing changes are allowed is created byclicking on theAdd defect button and providing the id of the defect. Defects are removedfrom the table by clickingRemove Defect.

n Add this note to the System message sends custom systemmessages that informs auser when a commit is blocked with the applied note.

3. Click OK.

HP Application Lifecycle Intelligence (2.0)Page 28 of 58

User GuideChapter 2: SCM System Integration

Page 29: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Setting Change DetectionALI detects changes made on preconfigured SCM repositories, loads information about codechanges and associated files to the ALM server and automatically creates traceability betweenloaded code changes and work items (requirements, defects). ALI supports two detectionmechanisms; the pollingmechanism and the pushmechanism.

When the pollingmechanism is switched on, ALI periodically checks for new changes in the givenSCM repository and loads them if they exist. For the pollingmechanism, no configuration isrequired on the SCM system side so this method operates without running SCM agents. The pollingmechanism corresponds to the optionRead changes from SCM on the Change Detection tab.

The pushmechanism connects SCM agents to the SCM system. The agent listens on the SCMsystem and when a change is committed to the preconfigured repository and branch, the agentchecks the policies and pushes the code change to the ALM server if the commit is allowed. Thepushmechanism corresponds to the optionReceive changes transmitted by SCM agent(s) on theChange Detection tab.

Change Detection settings can be accessed while setting up a new repository in theChangeDetection view, or by clicking on theChange Detection tab of an existing repository.

There are two detection options available:

Read changes from SCM

l This option enables automatic load changes from the SCM repository. To configure schedulingfor automatic load changes, see "Configuring the ALI Scheduler" on page 15.

l Immediate readings can be forced by clicking theSynchronize button.

Note: Synchronize process can bemonitored using the Task Manager tool of ALM found under theTools menu.

Receive changes transmitted by SCM Agent(s)

l If SCM agents have been setup, this option processes changes immediately. For details, see"Supported SCM Systems" on page 18

HP Application Lifecycle Intelligence (2.0) Page 29 of 58

User GuideChapter 2: SCM System Integration

Page 30: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 3

Build System IntegrationBuilds are the key deliverables of software development. Application Lifecycle Intelligence tracksinformation about builds together with their relationships to other ALM entities in order to providetraceability.

Themodel provides information about:

l Build artifacts (binaries produced by the build process).

l Content of the build (components, packages, files …).

l New changes included in the build (what’s new since the last build – code changes that make upthe build).

l Implemented work items (requirements, defects, stories that have been implemented/modifiedin the build).

l Relationships between Builds and Releases.

l Relationships between Builds and Tests.

Integration with build systems is a tool that allows you tomeasure the impact of code changes onsoftware deliverables and build artifacts. Builds allow you to report what new code has beenimplemented and what the impact is on the delivered project with the delta of key metrics (e.g. acertain commit caused a 5% degradation of test results).

This chapter includes:

Supported Build Systems 31

Adding a Build Server 34

Adding Build Configurations 35

Reusing SCMConfigurations from Build Configurations 36

Setting Build Configuration Defect Filters 36

Customizing ALI Project Lists 37

Setting Build Server Detection 38

Page 30 of 58HP Application Lifecycle Intelligence (2.0)

Page 31: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Supported Build SystemsALI provides support for the following build systems:

l Jenkins - Long-Term Support release - 1.409.2, 1.509.4 (Tested on 1.409.2, 1.509.4)

l Hudson - Latest Production Version - 2.1.2, 2.2.0, 2.2.1 (Tested on 2.1.2 and 2.2.1)

l TFS -Microsoft Team Foundation Server 2012 (Tested on 2012)

ALI provides plug-ins for build servers that automatically extract build information andmetrics andembed them into the ALMmodel.

ALI supports the following development metric tools:

l Hudson/Jenkins

n Unit Testing

o JUnit - Tested on versions bundled with supported build systems

o TestNG - Tested on Hudson 0.8, Jenkins 0.28

o NUnit - Tested on Hudson 0.10, Jenkins 0.14 + version of NUnit framework 2.5.10

n CodeCoverage Analysis

o Cobertura - Tested on Hudson 1.1, Jenkins 1.3

o Ncover - Tested on Hudson 0.3, Jenkins 0.3 + version of NCover 3.4.18.6937 x86 (trial)

l TFS 2012

n Unit Testing

o Visual Studio Managed Unit Testing Framework (MSTest - part of VS 2012)

o NUnit

n CodeCoverage Analysis

o Visual Studio 2012 Code Coverage

Hudson/Jenkins InstallationIt is necessary to install:

HP Application Lifecycle Intelligence (2.0)Page 31 of 58

User GuideChapter 3: Build System Integration

Page 32: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

l Hudson or Jenkins (download from http://hudson-ci.org or http://jenkins-ci.org).

n Hudson/Jenkins plugin supporting use of SCM (SVN and CVS are supported by default.Perforce and TFS require the installation of special plugins available in the publicHudson/Jenkins plugin repository).

n HP ALI Hudson/Jenkins plugin (ali-hudson-plugin.hpi located in the ALI bundle -agents\build-integration\hudson\). This plugin supports both Hudson and Jenkinssystems.

HP ALI Hudson/Jenkins Plugin InstallationTo install the HP ALI Hudson/Jenkins Plugin:

1. Go to theHudson/Jenkins->Plugin Manager and open theAdvanced tab.

2. In theUpload Plugin section browse to ali-hudson-plugin.hpi (part of the ALI bundle) andclick upload.

n If the project source code built by Hudson/Jenkins is stored in TFS, you have to install theali-hudson-tfs-plugin.hpi as well as the base ali-hudson-plugin.hpi.

Caution: ali-hudson-tfs-plugin.hpi requires pre-installation of Hudson/Jenkins TFSplugin.

n If the project source code building by Hudson/Jenkins is stored in Perforce, you have toinstall the ali-hudson-perforce-plugin.hpi as well as the base ali-hudson-plugin.hpi.

Caution: ali-hudson-perforce-plugin.hpi requires pre-installation of Hudson/JenkinsPerforce plugin.

Note: If using CVS or TFS SCM, see "Adding Repositories" on page 20 for additionalconfiguration of SCM in ALM.

3. After uploading the plugins, restart the Hudson/Jenkins server to enforce changes.

Note: The installed plugins should be listed in the Installed tab in thePlugin Manager.

Note: When the ALI plugin is installed properly, theALI Integration link should be visible in theHudson/Jenkins left sidemenu. Clicking this link displays capabilities provided by the plugin.

For more details on how to install and work with the Hudson/Jenkins plugins, please see theHudson/Jenkins system documentation.

HP ALI Hudson/Jenkins Plugin ConfigurationThe ALI Hudson plugin has a global configuration accessible from the global Configure System andthe job scope configuration accessible from a specific job. For a detailed description please go tothe ALI integration plugin on the Hudson/Jenkins server, where every property is described.

HP Application Lifecycle Intelligence (2.0) Page 32 of 58

User GuideChapter 3: Build System Integration

Page 33: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

To set the global configuration:

FromManage Hudson/Jenkins – Configure System, select theALI Integration section. Youcan configure the following options:

l Include the credentials in the SCM configuration - Specify if the username and password shouldbe included in the SCM repository descriptor. If this security model is enabled, the user mustalso have "extended read" permissions for the credentials to be listed.

Caution: Be very careful when enabling this option as the credentials for the SCM repositoryassociated with build configurations are exposed on REST endpoints as plain text.

l Update build information in HP ALM - When selected, information about performed builds is sentto the HP ALM server immediately after a build is started and then again when it is finished.

Note: All properties specified in the global configuration can be later overrode for a particularjob. These properties are required when you want to configure the pushingmechanism forthe given build server, but if you want to use the pushmechanism and alsowant to specifyALM properties for individual jobs, this optionmust be enabled.

l Hudson/Jenkins URL: - It is strongly recommended to specify the valid URL of the Hudson orJenkins server.

Note: In case of problems with Build System detail links, make sure the correctHudson/Jenkins server URL is entered.

To set a configuration for a particular job:

From the Configure link on left sidemenu for the given job, select theALI Integration option. Thisoptionmust be switched on if you want to have ALI integration enabled for the job.

l Test sources mapping pattern - Allows you to determine test source locations based on actualtest results. For details, including an example, see the ALI integration plugin help.

l HP ALM configuration –Overwrite the global ALI configuration properties - Update buildinformation in HP ALM for the given build job.

l NCover - Related to NCover code coverage for .NET configurations. TheNCover report XMLsspecifies the generated raw XML report files, such as myproject/target/coverage-reports/*.xml. Basedir of the fileset is the root workspace.

l Force.com – relating to Force.com integration. For details, see "Force.com Integration" on page39.

TFS Build Server

Note: For full support of TFS 2012 as a build server, the HP ALI TFS Services must be

HP Application Lifecycle Intelligence (2.0)Page 33 of 58

User GuideChapter 3: Build System Integration

Page 34: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

installed on the TFS 2012 Server. For details on configuration and limitations, see "TFSIntegration" on page 43.

TFS 2012 Build Features and Limitations

TFS build server support exposes data of all the defined build definitions, theirs builds, codechanges, test results, and code coverage per build. In addition, information on all the defined SCMrepositories per build definition is exposed. The build statistics are exposed without any limitationsexcept test and code coverage results.

To access the test results and code coverage results required by ALI for the build definition, thedefinitionmust meet the following criteria:

l The build definition and build must have a “drop folder” defined. The build must also have a logfolder.

l The build must clean the workspace at the beginning of the build. All code changes must bechecked out.

l Results of the test and code coverage frameworks that were usedmust be stored asattachments in the *.trx and *.coverage files, respectively.

l The TFS build server configuration does not support the pushmechanism. All builds are storedin HP ALM using the pollingmechanism.

Adding a Build ServerTo add a Build Server:

1. Log in to ALM with Administrator privileges and under theManagement tab click BuildServers to open the Servers page.

2. Click New Server, and from the drop down list select a Build Server type and click OK.

3. In the New Build Server dialog box, enter a name, a location of the server, a server description,and a username and password if required.

Note:

n The location is a full path to the server such as http://xx.xx.xxx.xxx:xxxx/yyyy. Checkwith your system administrator if unsure what this value should be. The /yyyy segmentis optional. It is for the context on which the server is running (such as on a Jenkinsserver).

n The build server location is the service which is part of HP ALI TFS Services which youdownload and install on the TFS server. The service installer is part of ALI bundle. Asthe TFS 2012 build server location, use the URL in the following format for each project

HP Application Lifecycle Intelligence (2.0) Page 34 of 58

User GuideChapter 3: Build System Integration

Page 35: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

collection:http://tfsServer:tfsPort/tfsali/Service/BuildService.svc/ali/ProjectCollectionName.

Where:

o tfsServer – address of the TFS server

o tfsPort – port of the TFS server

o tfsali – name of the application on the IIS Site defined during installation of HP ALITFS Services

o ProjectCollectionName – name of project collection

4. Select theChange Detection tab and optionally:

n Select Read changes from build server and provide an interval or schedule run times ifrequired.

n Select Receive builds transmitted by build server agent(s) if required. See Build ServerDetection for more information.

5. Click Submit to add the server.

Adding Build ConfigurationsTo add a Build Configuration:

1. Go to theBuild Configurations tab and click add.

2. Select a Build Configuration from the presented list and click OK to open the details window.

Note: This list contains the unused configurations of the governed server.

Caution: This list contains only the configurations for Hudson/Jenkins jobs with ALIintegration enabled.

3. Click theRelease drop downmenu and select an associated release.

4. Click theBuild Configuration drop downmenu and select a build type. This value allows youto filter builds in the Builds module under the Development tab.

5. Optionally:

n Enable the configuration - If the build configuration is enabled, new builds from the buildsystem are loaded.

HP Application Lifecycle Intelligence (2.0)Page 35 of 58

User GuideChapter 3: Build System Integration

Page 36: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

n Set the configuration as default - Default build configurations are used for computation ofstatistics displayed for the associated release.

Reusing SCM Configurations from BuildConfigurations

Existing build configurations are stored by ALM and the SCM branches and repositories can beapplied to newly created configurations.

For a particular build configuration on a build system, SCM related information is typically alreadyspecified (SCM repository, branch, credentials). ALI provides the possibility to reuse thisinformation from a build system for a particular build configuration to simplify the configuration ofanother SCM system within ALI.

To apply an existing SCM configuration from a particular build configuration:

1. Click on a server in theBuild Servers page of theManagement module.

2. Select theBuild Configurations tab.

3. Select a configuration and click it to bring up theBuild Configuration Details popup window.

4. Select theSCM tab to display the available repositories and branches.

5. Select the required repositories and/or branches and click the + button to apply them to theSCM configuration.

The status message next to the repository or branch location provides information aboutwhether the repository or branch has been previously defined or not.

Note: Clicking the details button will bring up the repository or branch details popup window of theselection.

Setting Build Configuration Defect FiltersSetting of this filter reduces input set of open and new defects associated with the release shownon the Build Report Defect Trend graph for this build configuration. Do not specify defect status andtarget release in this filter.

To apply a defect filter to a particular build configuration:

1. Click on a server in theBuild Servers page of theManagement module.

2. Select theBuild Configurations tab.

3. Click on a configuration name to bring up theBuild Configuration Detailswindow.

HP Application Lifecycle Intelligence (2.0) Page 36 of 58

User GuideChapter 3: Build System Integration

Page 37: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

4. Select Defect Filter.

5. Click Change Defect Filter to open the filter defect window.

6. Add or remove a filter condition and click OK to apply the condition.

To remove a defect filter from a particular build configuration:

Click Clear Defect Filter, confirm the deletion by clickingYes.

Customizing ALI Project ListsThe following Project lists may have their behavior changed in the customizemodule:

l ALI Build Category

The Build Category from the list on the Build module tool bar contains the values of the ALI BuildCategory project list

l ALI Closed Status

The project list contains all the values with a “Closed” status of defects. Closed In Build valuecan only be applied to defects with this status.

l ALI QA Status

TheQA Status field on the Build entity contains the values from the ALI QA Status project list.

l ALI Reported Severity

The links to code issues visible in the drop downwindow of the Requirement/Defect DevelopmentActivity Tab are defined by the project list. The customizable values in the customizemodulemust contain either full set or a subset from the Severity project list.

To customize the configurations list:

1. Select Customization from the Tools menu of ALM, .

2. Select theProjects Lists object from the left menu.

3. Select the particular project list.

4. Add new items, rename or delete items from the list.

5. Click Return to commit the changes and return to ALM.

HP Application Lifecycle Intelligence (2.0)Page 37 of 58

User GuideChapter 3: Build System Integration

Page 38: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Setting Build Server DetectionApplication Lifecycle Intelligence detects new builds on build servers, loads new statusinformation, associated code changes and optionally, the results of unit tests, and code coverage.Traceability is automatically created between builds, code changes and work items (defects,requirements). As with SCM integration, ALI supports two detectionmechanisms; the pollingmechanism and the pushmechanism.

Change Detection settings can be accessed while setting up a new build server in the ChangeDetection view, or by clicking on the Change Detection Tab of an existing build server.

Polling:

With the pollingmechanism option, ALI periodically checks for new builds in the given build serverand loads them if they had not already existed on ALM server.

The pollingmechanism is activated with theRead changes from build server option on the ChangeDetection tab. You can load changes on demand using theSynchronize command. To configurescheduling for automatic load changes, see "Configuring the ALI Scheduler" on page 15.

Push:

The pushmechanism works in an opposingmanner to the pollingmechanism. When theUpdatebuild information in HP ALM option is selected in the ALI integration plugin on the build server (fordetails, see "HP ALI Hudson/Jenkins Plugin Configuration" on page 32), the plugin listens on thebuild server. When a new build is starting, it pushes information about the build to the ALM server.When the build completes, the status and other build relevant information are updated on the ALMserver.

The pushmechanism is activated by theReceive builds option transmitted by build server agent(s)option on the Change Detection tab.

HP Application Lifecycle Intelligence (2.0) Page 38 of 58

User GuideChapter 3: Build System Integration

Page 39: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 4

Force.com IntegrationThis integration allows teams developing for the Force.com platform to benefit from all the featuresthat ALI brings to standard development. Although all the source code is stored, compiled andtested in the Cloud, ALI establishes traceability between code, work items (requirements anddefects), builds and build metrics (test results and coverage).

Note: Force.com integration tested on Force.com version API 22.0

The integration between Force.com and ALI requires:

l Storing Force.com source code in an SCM system (for the complete list of SCM systemssupported by HP ALI see "Supported SCM Systems" on page 18

l Hudson or Jenkins

n Hudson/Jenkins plugin supporting use of SCM (SVN and CVS are supported by default).

n HP ALI Hudson plugin (ali-bundle.zip/build/Hudson/ali-hudson-plugin.hpi).

For details, see "HP ALI Hudson/Jenkins Plugin Installation" on page 32.

l Configuring a build management server to deploy source code to the integration/stagingenvironment.

l Apache Ant (download from http://ant.apache.org/).

l HP force-deploy-task is located in the ALI archive (/tools/force-deploy-task/force-deploy-task-bundle.zip, unpack content of zip file to ant_install_dir/lib).

This chapter includes:

Project Deployment, Testing and Report Generation 39

Hudson/Jenkins Force.com Configuration 41

Project Deployment, Testing and ReportGeneration

Deployment of source codes, testing and the following report generation is ensured by the specialAnt task HP force-deploy-task. In order to function, it is necessary to create the Ant build script“build.xml” (if it does not exist) in the root folder of a Force.com project similar to the followingexamples:

Page 39 of 58HP Application Lifecycle Intelligence (2.0)

Page 40: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

1. The following example deploys source code to a configured Force.com environment and runsall tests. Because all tests will be run, report should contains code coverage of whole project.

<project name="Sample usage of force-deploy-task" default=" deployAndTestAndReport " basedir=".">

<target name="deployAndTestAndReport"><taskdef name="sfdeploy" classname="com.claimvantage.force.ant.DeployWithXmlRe

portTask"/><delete dir="test-report-xml" quiet="true"/><sfdeployusername="username to force.com environment"password="password to force.com environment"serverurl="force.com server URL"deployRoot="path to source directory"runalltests="true"reportDir=" test-report-xml " />

</target></project>

2. The following example deploys source code to a configured Force.com environment and runsonly tests that match the given pattern. In this case, ALM will not be provided full codecoverage.

<project name="Sample usage of force-deploy-task" default=" deployAndTestAndReport " basedir=".">

<target name="deployAndTestAndReport"><taskdef name="sfdeploy" classname="com.claimvantage.force.ant.DeployWithXmlRe

portTask"/><delete dir="test-report-xml" quiet="true"/><sfdeployusername="username to force.com environment"password="password to force.com environment"serverurl="force.com server URL"deployRoot="path to source directory"runalltests="false"reportDir=" test-report-xml "><!-- Run only tests with file names that match this pattern --><batchtest>

<fileset dir="src/classes"><include name="*Test.cls"/>

</fileset></batchtest>

</target></project>

Description of the HP force-deploy-task (in the example defined as sfdeploy):

HP Application Lifecycle Intelligence (2.0)Page 40 of 58

User GuideChapter 4: Force.com Integration

Page 41: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

l Attribute username – login name to force.com environment

l Attribute password – password to force.com environment

l Attribute serverurl – URL of login page to force.com environment

l Attribute deployRoot – path to source code directory (where folders classes, triggers etc. arelocated)

l Attribute runalltests – (true/false) if it is true all tests are started and code coverage of project isreported, if it is false only tests specified by batchtest element are started (code coverage is notprovided)

l Attribute reportDir – directory where all reports will be stored

l Element batchtest – element specifies which tests should be started (works only ifrunalltests=false)

n Element fileset – file set of tests to run

o Attribute dir – directory where tests are located

o Element include

o Attribute name – class name pattern of tests to run

Hudson/Jenkins Force.com Configuration1. Create a Free style job and configure the SCM and Build Triggers as needed

2. Add the build step Invoke Ant and specify the targets which should be started (as in theexample deployAndTestAndReport).

3. In thePost-build Actionssection, configure as per the following image:

4. In the test report XMLs, replace the test-report-xml string with your actual report directory(attribute reportDir in force-deploy-task).

HP Application Lifecycle Intelligence (2.0) Page 41 of 58

User GuideChapter 4: Force.com Integration

Page 42: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

5. In the test sources mapping pattern, replace src with your actual path to the source directory.

The above configuration is sufficient for most of cases, but in case that:

l the force-deploy-task is defined in the distributed Ant script which is called from themain Antscript, configure the Report directory (value of attribute reportDir in Ant script) in Ali Integration/Advanced

l the source code directory (which contains folders classes, triggers etc.) is not in the srcdirectory which is located directly in the workspace root, configure the Project root.

Configurations examples:

HP Application Lifecycle Intelligence (2.0)Page 42 of 58

User GuideChapter 4: Force.com Integration

Page 43: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 5

TFS IntegrationFor full support of Microsoft Team Foundation Server (TFS) systems, youmust install the HP ALITFS Services on the TFS Server.

To install the services, run the HP ALI TFS Services installer on the TFS server. The installer isincluded in the ALI bundle. The installer sets up the environment with all necessary validation. HPALI TFS Installer is valid for all versions of TFS supported by ALI.

For details on supported TFS versions, see "Supported SCM Systems" on page 18 and "SupportedBuild Systems" on page 31.

This section includes:

l "HP ALI TFS Services"

l "Upgrading from an Earlier ALI Version"

l "Moving from TFS over SvnBridge to Native TFS integration"

HP ALI TFS ServicesHP ALI TFS Services include the following:

l Line Count Service:Counts changed lines within commits.

l Build Service:Provides build information. Available for TFS 2012 only.

l ALI Agent services:Services used by the ALI agent for validation of commit messages andpush code changes into ALM.

Upgrading from an Earlier ALI VersionIf you were working with native TFS integration in ALI 2.0.0.137612 or earlier, it is stronglyrecommended to uninstall/remove the previous version of HP ALI TFS Services. This is notrequired if you were previously working with TFS over SvnBridge.

To remove a previous version of HP ALI TFS Services:

1. Uninstall the previous CheckinEventService using BisSubscribe /unsubscribe.

2. Remove from IIS any IIS Application, IIS Web Site, or IIS Application Pool related to theprevious version of the ALI TFS Services.

3. Delete theAliTfsServicesSite folder, located under C:\inetpub on the TFS server. This folderis mapped to the previous ALI TFS Services IIS Application.

Page 43 of 58HP Application Lifecycle Intelligence (2.0)

Page 44: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Moving from TFS over SvnBridge to Native TFS integrationTo start using the built-in TFS integration:

1. Remove all the previous SCM repositories of the TFS over SvnBridge type that areconfigured in ALM.

2. Add a new SCM repository of the TFS type for each Project Collection.

3. Add an SCM branch for each project that you had previously configured in ALI.

HP Application Lifecycle Intelligence (2.0)Page 44 of 58

User GuideChapter 5: TFS Integration

Page 45: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 6

Monitoring SCM Changes and TraceabilityAfter setting up the repositories, branches and enforcement rules, Application Lifecycle Intelligence(ALI) aggregates the data and presents the changes in the Code Changes tab of ALM. This tabprovides information about what is happening within a project from the source code point of viewandmaintains traceability between the source code, requirements/defects and releases.

Reporting capabilities are an important part of effective project management and ALI extends theHP ALM platform reports with additional reports covering code changes entities.

You can use project reports and graphs (summary, progress & trend) to review and compare thedevelopment activity of your teams and developers. In addition to this, ALI provides a ChangeImpact Report that describes the impact of implemented changes on defects and requirements.

This chapter includes:

Viewing the Code Change Table 46

Code Change Details 46

Viewing Change Impact Report 47

Generating Project Reports 47

Generating Graphs 48

Page 45 of 58HP Application Lifecycle Intelligence (2.0)

Page 46: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Viewing the Code Change TableTheCode Changes tab is available in the development module.

Initial display presents all code changes in selected releases and a given time period. This can bemodified and filtered using the drop downmenus at the top of the table.

The table presents Date/Time of the change, developer whomade the change, number of affectedfiles and changed lines, and the commit message provided by a developer. The status messagedisplays an error or warning when a commit message doesn't correspond to a predefined pattern.The columns in the table may bemodified and filtered by enabling the filters under theViewmenu.

Black indicates there is an associated requirement for the code change.

Green indicates there is an associated defect for the code change.

Red indicates there is neither a defect nor a requirement associated for the code change.

In addition to release and time, data associated with only requirements or defects and unassignedchanges can be displayed.

Note: An unassigned change is a commit which is related to neither requirement nor a defect. Thismay be valuable information for amanager of a team working on unplanned changes.

Advanced filtering can be accessed by clicking on the filter button .

Enabling the Information Panel under theViewmenu opens the panel under the table with tabs forviewing associated files, requirements and defects within the code changes.Commit messages orstatus messages can also be viewed in this panel.

Code Change DetailsTo view Code Change Details:

l Double click on a Code Change or click the Code Change Details button to open the codechange in a new window.

HP Application Lifecycle Intelligence (2.0)Page 46 of 58

User GuideChapter 6: Monitoring SCMChanges and Traceability

Page 47: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

n In addition to the basic attributes, you can see list of associated files together with theirstatus and have the ability to compare differences to previous versions of the file.

n If the code change is associated with a requirement or defect, then links are provided byclicking the Requirements or Defects menu items in the left sidemenu.

Viewing Change Impact ReportALI reports the impact of changes not only in terms of files & modules but also work items assignedto developers (requirements & defects). It provides aggregated information about code coverage,test results, amount of changes and who committed impacted work items.

To view the Change Impact Report:

In the Code Changes module, select a time period and a release from the toolbar or grid, and clickView Report. All other filter values are ignored.

At the bottom of the Change Impact Report, the following options are available:

l Show Unassigned Changes. Displays changes that are not associated with a defect orrequirement.

l Print This Report.

l Email This Report. Creates an email in your email client that contains the URL of the report.

Generating Project ReportsThe ALI extension provides a set of predefined report templates that are added to the standard ALMreport selection.

Predefined templates are:

l ALI – Code Changes Template

l ALI – Defect Overview Template

l ALI – Requirement Overview Template

l ALI – Build Template

These templates allow you to create project reports related to Code changes and Builds.

For more information about the generation of project reports see theHP Application LifecycleManagement User Guide.

HP Application Lifecycle Intelligence (2.0) Page 47 of 58

User GuideChapter 6: Monitoring SCMChanges and Traceability

Page 48: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Generating GraphsThe ALI extension enables you to generate graphs for Code changes.

You can generate the following graphs for code changes:

Graph Description

Code changesProgress Graph

Shows how many code changes accumulated in anALM project at specific points during a period oftime.

Specify the time interval displayed along the x-axis,and the requirement information by which ALMgroups the data. Specify whether you want to viewthe count of code changes, sum of changed files orsum of changed lines related to developer.

Code changesSummary Graph

Shows how many code changes are currently in anALM project.

Specify the type of data displayed along the x-axis,and the code change information by which ALMgroups the data.

Code changes TrendGraph

Shows the history of changes to specific codechanges fields in an ALM project, for each timeinterval displayed.

Specify the field for which you want to view thenumber of changes and the time period for whichyou want to view data.

To Generate a Graph:

1. Launch theGraphWizard.

TheGraphWizard guides you through the steps involved in creating a graph and configuring itssettings. You launch the graph wizard either from the Analysis View module, or while workingin the Code changes module.

a. In the Analysis View module.

On the ALM sidebar, under Dashboard, select Analysis View, right-click a folder, andselect Graph Wizard.

b. In the Code changes module.

Select Analysis > Graphs > Graph Wizard.

HP Application Lifecycle Intelligence (2.0)Page 48 of 58

User GuideChapter 6: Monitoring SCMChanges and Traceability

Page 49: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

c. In the GraphWizard window change the entity name to Code Changes. There are threegraph types listed. Select the appropriate graph and follow the wizard instructions.

2. Create a predefined graph.

While working in the Code changes module, generate an impromptu graph to analyze themodule data.

n Select Analysis > Graphs and select one of the predefined graphs.

You can choose from :o CodeChanges - Summary Graph - 'Group by Developer'

o CodeChanges - Summary Graph - Sum of 'Files' Group by Developer'

o CodeChanges - Summary Graph - Sum of 'Lines' Group by Developer'

o CodeChanges - Progress Graph - 'Group by Developer'

o CodeChanges - TrendGraph - 'Group by Developer'

3. Create a graph in Analysis View.

a. Open the Analysis View module. On the ALM sidebar, under Dashboard, select AnalysisView.

b. Add a folder to the analysis tree. Right-click a folder under the Private or Public root folder,and select New Folder.

c. Create a new graph. Right-click a folder, and select New Graph. Change entity toCodeChanges, select required graph type and fill in the graph name in theNew Graph dialogbox.

d. Click on theView Tab in the right panel.

For more information about the generation of graphs see theHP Application Lifecycle ManagementUser Guide.

HP Application Lifecycle Intelligence (2.0) Page 49 of 58

User GuideChapter 6: Monitoring SCMChanges and Traceability

Page 50: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 7

Monitoring Development ActivityAfter setting up build servers and configurations, Application Lifecycle Intelligence (ALI) presentsDevelopment Activity as tabs in the Releases, Defects and Requirements modules of ALM. Thesetabs present information about of what is happening within a project from the build and developerpoint of view.

This chapter includes:

Development Activity Releases 51

Development Activity Defects 51

Development Activity Requirements 51

Monitoring Development Activity in Defect Details 52

Page 50 of 58HP Application Lifecycle Intelligence (2.0)

Page 51: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

The links within the tabs provide detailed information and statistics for the selected build.

The table at the bottom of the tab presents changes in the build as per developer.

Click Change to see the activity of other configured builds.

Development Activity ReleasesIf there is development activity associated with a release, a green star icon will be visible on thetab. Click the tab to view the activity.

Click Change to select a different build configuration other than the default to view.

The success rate in the Build Status area is the percentage of builds that completed with statusSuccess orWarning. Click Configure Builds to change the configuration. For details, see "AddingBuild Configurations" on page 35.

Development Activity DefectsIf there is development activity associated with a defect, a green star icon will be visible on the tab.Click the tab to view the activity.

The tab presents Development Metrics showing unit tests and coverage and DefectImplementations for the requirement. Click the Unit Tests link to see theDefect Unit Tests Reportand the Coverage link to see theDefect Coverage Report.

Click the links under Defect Implementation to see build details or specific code changes.

The table at the bottom of the tab presents Code Changes and Active Developers associated withthe defect.

Click themessage link in the code change to be taken to the Defect details page.

Click on the column headers to sort or filter the tables.

Development Activity RequirementsIf there is development activity associated with a requirement, a green star icon will be visible onthe tab. Click the tab to view the activity.

The tab presents Development Metrics and Requirement Implementations for the requirement.Click the link Unit Test link to see theRequirements Unit Tests Report and the Coverage link tosee theRequirement Coverage Report.

The table at the bottom of the tab presents the specific Code Changes and Active Developersassociated with the requirement.

Click themessage link in the code change to be taken to the Code Change details page.

Click on the column headers to sort or filter the tables.

HP Application Lifecycle Intelligence (2.0)Page 51 of 58

User GuideChapter 7: Monitoring Development Activity

Page 52: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Monitoring Development Activity in Defect DetailsApplication Lifecycle Intelligence introduces three new values to the Defect Details page.

Detected in Build – states on which build the given defect has been detected.

Closed in Build - states on which build the given defect has been closed.

Caused by Code change – states which code change caused this defect.

If a static code analysis tool supporting integration with HP ALM Platform has been configured,these values will be automatically filled. If not, they can be filledmanually using the drop down list.

Data from these fields populate the defects tab the Build Details page and are represented in theBuild Summary Report. For details, see "Defects Tab" on page 55 and "Build Reports" on page 56.

HP Application Lifecycle Intelligence (2.0) Page 52 of 58

User GuideChapter 7: Monitoring Development Activity

Page 53: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Chapter 8

Monitoring Build ActivityAfter setting up build systems, Application Lifecycle Intelligencemonitors build results togetherwith related code and implemented working items.

In the Builds module, you can see the status and results of your Fast, Nightly or Integration buildsand take action in the case of reported errors. Depending on build system configuration, you canmonitor the results of unit tests, the number of successful or failed tests, code coverage, sourcecode and defect statistics.

This chapter includes:

Viewing Builds 54

Build Details 54

Requirements Tab 55

Defects Tab 55

Code Changes Tab 55

Active Developers Tab 56

Build Reports 56

Generating Build Graphs 56

Page 53 of 58HP Application Lifecycle Intelligence (2.0)

Page 54: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Additionally, specific project reports and graphs for Builds are available. For details, see "BuildReports" on page 56 and "Generating Build Graphs" on page 56

Viewing BuildsWhen logging on to a project that has the ALI extension enabled, theBuilds tab is available.

The initial display presents all builds in a selected release(es) and a given time period. This can bemodified and filtered using the drop downmenus at the top of the table.

The table presents Date/Time of the build, and all other information recorded for the build. Thecolumns in the table may bemodified and filtered by enabling the filters under theViewmenu.

Green indicates a successful build.

Yellow indicates a problem with the build and a warning.

Red indicates the build failed.

Advanced filtering can be accessed by clicking on the filter button .

Enabling the Information Panel under theViewmenu opens the panel under the table with tabs forviewing requirements, defects, code changes, distribution and status messages of the build.

Build DetailsTo view Build Details:

HP Application Lifecycle Intelligence (2.0)Page 54 of 58

User GuideChapter 8: Monitoring Build Activity

Page 55: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Double click on a Build or click the Build Details button to open the build details in a newwindow.

In addition to basic information about the build, selecting a tab provides specific information aboutthe build.

Available Tabs:

n "Requirements Tab" below

n "Defects Tab" below

n "Code Changes Tab" below

n "Active Developers Tab" on the next page

Select a status from theQA Status drop down list and click OK to apply that status to the build.

Click View Report to generate a Build Change Report. For details, see "Build Reports" on the nextpage.

Click Build System to generate a view of the entire Build System.

Requirements TabProvides a list of requirements related to the build.

Click the column header to sort the list.

Click on the requirement name to be taken to the requirement details page in ALM.

Defects TabProvides a list of defects associated with a build.

Detected Defects, Closed Defects and Delivered Fixes can be viewed by selecting the associatedtab. A green star icon indicates a new entry in a list.

Click the column header to sort the list.

Click the link in the defect summary to be taken to the defect detail page in ALM.

Code Changes TabProvides a list of code changes associated with the build.

Click the column header to sort the list.

Click on the code changemessage to be taken to the code change details page in ALM.

HP Application Lifecycle Intelligence (2.0) Page 55 of 58

User GuideChapter 8: Monitoring Build Activity

Page 56: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Active Developers TabPresents a list of developers associated with the build along with level of contribution.

Click the column header to sort the list.

Build ReportsTheBuild Summary Report provides an overview view of builds from a given time period andbuild category. The graph combines information from SCM activity and open defects from theselected release.

To view a Build Summary Report:

1. Select Builds from the Development module of Application Lifecycle Intelligence.

2. Click theView Report button to generate the summary report in a new window.

TheSpecific Build Report displays the requirements, delivered defects, new defects and closeddefects associated with that build.

To view a Specific Build Report:

1. Click on the link for that build in the summary report, or open the build detail page and click theView Report button.

2. Click theShow Unassigned Changes link to display unassigned changes.

TheBuild Change Report provides an overview of requirements affected by the selected buildand defects that have been altered, closed or created by the selected build.

To view a Build Change Report:

1. From theBuilds page of theDevelopmentmodule, select a build and open theBuild Detailspage.

2. Click View Report to generate the change report in a new window.

Generating Build GraphsThe ALI extension enables you to generate graphs for Builds.

You can generate the following graphs:

HP Application Lifecycle Intelligence (2.0)Page 56 of 58

User GuideChapter 8: Monitoring Build Activity

Page 57: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

Graph Description

BuildsSummaryGraph

Shows how many builds are currently in an ALM project.

Specify the type of data displayed along the x-axis, and the build information bywhich ALM groups the data.

Builds TrendGraph

Shows the history of builds to specific build fields in an ALM project, for eachtime interval displayed.

Specify the field for which you want to view the number of builds and the timeperiod for which you want to view data.

To Generate a Graph:

1. Launch theGraphWizard

TheGraphWizard guides you through the steps involved in creating a graph and configuring itssettings. You launch the graph wizard either from the Analysis View module, or while workingin the Builds module.

n In the Analysis View module.

On the ALM sidebar, under Dashboard, select Analysis View, right-click a folder, and selectGraph Wizard.

n In the Builds module.

Select Analysis > Graphs > Graph Wizard.

n In the GraphWizard window change the entity name to Builds. There are two graph typeslisted. Select the appropriate graph and follow the wizard instructions.

2. Create a predefined graph

While working in the Builds module, generate an impromptu graph to analyze themodule data.

n Select Analysis > Graphs and select one of the predefined graphs.

You can choose from :o Builds - Summary Graph - by 'Build Category'.

o Builds - Summary Graph - by 'Build Category' Group by 'Build Status'.

o Builds - Summary Graph - by 'QA Status'.

o Builds - TrendGraph - Group by 'Build Category'.

3. Create a graph in Analysis View.

HP Application Lifecycle Intelligence (2.0) Page 57 of 58

User GuideChapter 8: Monitoring Build Activity

Page 58: HP Application Lifecycle Intelligence User Guide.… · n Perforce TheintegrationisSCMclientagnostic;developerscancommitchangesfromtheircurrentSCM ... HP Application Lifecycle Intelligence

a. Open the Analysis View module. On the ALM sidebar, under Dashboard, select AnalysisView.

b. Add a folder to the analysis tree. Right-click a folder under the Private or Public root folder,and select New Folder.

c. Create a new graph. Right-click a folder, and select New Graph. Change entity toBuilds,select required graph type and fill in the graph name in theNew Graph dialog box.

d. Click on theView Tab in the right panel.

For more information about the generation of graphs see theHP Application Lifecycle ManagementUser Guide.

Additionally, a specific project report for Builds is available. For details, see "Generating ProjectReports" on page 47.

HP Application Lifecycle Intelligence (2.0)Page 58 of 58

User GuideChapter 8: Monitoring Build Activity