Junit SQL Storage

ID: junit-sql-storage

Build Status Contributors Jenkins Plugin GitHub release Jenkins Plugin Installs


Implements the pluggable storage API for the Junit plugin.

In common CI/CD use-cases a lot of the space is consumed by test reports. This data is stored within JENKINS_HOME, and the current storage format requires huge overheads when retrieving statistics and, especially trends. In order to display trends, each report has to be loaded and then processed in-memory.

The main purpose of externalising Test Results is to optimize Jenkins logic by querying the desired data from specialized external storage.

This plugin adds a SQL extension, any database should work although we're only currently testing against PostgreSQL.

Tables will be automatically created.

Getting started

Install your database vendor specific plugin, you can use the Jenkins plugin manager to search for it:


e.g. you could install the PostgreSQL Database plugin.


Manage Jenkins => Configure System => Junit

In the dropdown select 'SQL Database'

Junit SQL plugin configuration

Manage Jenkins => Configure System => Global Database

Select the database implementation you want to use and click 'Test Connection' to verify Jenkins can connect

Junit SQL plugin database configuration

Click 'Save'

Configuration as code

        database: "jenkins"
        hostname: "${DB_HOST_NAME}"
        password: "${DB_PASSWORD}"
        username: "${DB_USERNAME}"
        validationQuery: "SELECT 1"
    storage: "database"


Refer to our contribution guidelines


Licensed under MIT, see LICENSE