Identify hotspots in your code

ALM Octane uses commit information to help you, the developer, identify hotspots in the code. Once identified, you can minimize risks associated with updating the code. ALM Octane also displays a risk indication for commits that include changes to hotspot files, and for features associated with such risky commits.

Use hotspots to minimize risks

Hotspots are files that contain sensitive code, which is risky to change. The code might be too complex, or the functionality it covers might be insufficiently tested.

To reduce the risk of future changes causing quality issues:

  • Simplify and refactor the code.

  • Increase testing of this code's functionality.

Back to top

Hotspot criteria

ALM Octane uses commit information to identify hotspots.

Hotspot. ALM Octane considers a file a hotspot if it was recently changed when fixing a defect.

Hotspot level. The hotspot level is the level of potential risk when changing code in a hotspot. A high hotspot level indicates that changing this code has a high risk of introducing regressions or other quality issues.

ALM Octane determines the hotspot level based on the following criteria:

  • The number of defects associated with this file.
  • The age of the changes made to this file.

This means the level is time-sensitive. Over time, if no additional defect-related changes are committed on a hotspot file, its hotspot level diminishes.

Back to top

Set up the hotspot dashboard widget

The hotspot widget in the Dashboard displays a heatmap of your code base folders, highlighting areas by hotspot level.

Prerequisites

To configure the widget:

  1. In the Dashboard module, locate the Hotspots files in repository (by folder) widget.

    If it is not displayed, click + and add the widget to your dashboard.

  2. Configure the widget to show the code base you want to assess:

    In the Scope tab, select a Repository and a Base folder for risk assessment.

    The lists to select from include the repositories and folders available via the CI server SCM integration.

Back to top

Assess potential risk using the hotspot widget

After you Set up the hotspot dashboard widget, the widget displays a heatmap of your code base folders, highlighting areas by hotspot level. The hotspot level of a folder is the average hotspot level of the files in that folder.

To assess potential risk using the widget:

  1. Check which folders contain a higher percentage of hotspots.

    • Each area in the heatmap represents a folder under the base folder, regardless of folder structure.

    • The size of each area indicates the amount of files in the folder.

      Note: ALM Octane analyzes only files that were changed in SCM commits discovered as part of a pipeline run.

      Over time, this will cover more and more of your code base.

    • The color of each area indicates the hotspot level. This is the level of potential risk in changing a hotspot file.

  2. Hover over an area in the heatmap to see a breakdown of the hotspot levels within a specific folder. You can see the number of files in the folder for each level.

  3. Click an area in the heatmap to see the hotspot levels of each file in the folder.

Back to top

Identify risky commits and features at risk

ALM Octane displays a risk indication for commits that include changes to hotspot files and for features associated with such commits.

  • Identifying risky commits can help isolate the problem when analyzing pipeline failures.
  • Identifying features at risk can help assess feature release readiness.

Examples for using the risk indication

Back to top

Identify application modules at risk

Include the percentage of risky commits in the criteria used by the Quality by application module dashboard widget. Application modules in this heatmap are marked red for attention if they are associated with more risky commits than the threshold you define.

Back to top

See also: