Skip to content

Teamscale Integration with IntelliJ

Teamscale integrates with IntelliJ IDEA and many other IntelliJ IDEs, such as PyCharm and WebStorm. Before installing the Teamscale Integration for IntelliJ, make sure its system requirements are met.

Installing the Plug-in

Depending on your needs, there are several options to install the Teamscale Integration for IntelliJ.

For most users, installing the latest version of the plug-in from the Jetbrains Marketplace is recommended.

  1. Select File > Settings from the IDE's menu bar.
  2. Select Plugins.
  3. Search for Teamscale Integration in the Marketplace.
  4. Click the Install button.
  5. Restart the IDE to conclude the installation.

Installing Any Version From the CQSE Website

Unlike the Jetbrains Marketplace, the CQSE website offers both the latest version and older versions of the plug-in.

  1. Select File > Settings from the IDE's menu bar.
  2. Select Plugins.
  3. Select Manage Plugin Repositories from the cogwheel menu.
  4. Add the desired plugin repository.
    • Latest Version: https://downloads.teamscale.com/ide/intellij/latest/updatePlugins.xml
    • Older Version: https://downloads.teamscale.com/ide/intellij/vM.N.x/updatePlugins.xml (replacing M.N by the feature version you need but keeping the .x, e.g., 7.8.x)
  5. Search for com.teamscale.ide.intellij.
  6. Click the Install button.
  7. Restart the IDE to conclude the installation.

Installing While Offline

In case you cannot reach the Jetbrains Marketplace or CQSE Website during the installation, e.g., due to a security policy, you can perform an offline installation.

  1. Download an archive of the plugin repository from the CQSE website.
  2. Transfer the downloaded archive to your offline computer and unpack it there.
  3. Select File > Settings from the IDE's menu bar.
  4. Select Plugins.
  5. Select Install Plugin from Disk from the cogwheel menu.
  6. Select the com.teamscale.ide.intellij ZIP archive file inside the unpacked archive (not the plugin repository archive itself).
  7. Click the Install button.
  8. Restart the IDE to conclude the installation.

Connecting to Teamscale

You need to perform the following actions to configure a Teamscale server:

  1. Open the IntelliJ settings via the menu File > Settings.

  2. Expand Tools (1) and select Teamscale (2) on the left hand side.

  3. Use the + button to add a new Teamscale server (3).

  4. In the details (4) fill the URL for the server, and your Username and IDE Access Key

    Configuring a Teamscale Server Connection

By clicking on the Get Key button, you can navigate to the Teamscale web interface and generate a personal access key.

Click the Validate Connection (5) button to ensure successful connection the Teamscale server. Click Apply and OK to save the settings.

Configuring Using .teamscale.toml Files

In addition to connecting to a Teamscale server, the local project needs to be mapped to the project(s) on the Teamscale server. Since Teamscale 8.3, this is done using one or more .teamscale.toml configuration files in a simple, uniform file format (.teamscale.toml).

Fetching Findings

To check if everything is configured correctly, open the Findings tool window via the menu (View > Tool Windows > Findings):

Findings Tool Window

Now you can select any resource that has findings and wait for findings to appear in the Findings tool window. The symbol on the top of the left hand side of the tool window will indicate the server's reachability state. Hover the mouse over the icon to get additional information. A click on the icon opens up the Teamscale settings.

Refreshing Findings

In order to get an updated view of the findings of a selected folder or a file after changes in a file system, for instance by switching to a new repository or branch, click the Refresh findings button in the Findings tool window.

Performing Pre-Commit Analysis

The IntelliJ plug-in can be used to analyze changes prior to committing them to the repository. This functionality is called pre-commit analysis. The findings of these pre-commits are shown as any other finding in the Findings tool window. The Automatic Pre-Commit Analysis option under the Teamscale tab must be enabled:

Pre-commit Analysis Option

The pre-commit analysis is started automatically when you do one of the following actions:

  • Open a file in the editor
  • Switch to an already open file in the editor
  • Save the file currently active editor
  • Save all open files

Under the hood, Teamscale treats these changes as a commit on a new, virtual branch: your pre-commit branch. IntelliJ will poll the Teamscale server until analysis of this commit is done. Once analysis is finished, Teamscale will show the findings from your pre-commit branch.

Note that, by default, the Teamscale server enforces some limits on the pre-commit branch w.r.t. to the number of files that may be included in each pre-commit. These limits exist so that one overly large pre-commit upload does not disproportionately delay analysis of other commits. More information is available here .