---
name: ContinuousDelivery-publish_test_data
title: Publishing test data to DevOps Insights
description: Users can upload test results to IBM Cloud&reg; DevOps Insights from any continuous integration and continuous delivery (CI/CD) tools and see all of those test results in the DevOps Insights Quality Dashboard page. A CI/CD tool refers to tools like Jenkins, Travis CI, and IBM&reg; Continuous Delivery Pipeline for IBM Cloud&reg; that are used to create builds, run tests, and perform deployments.
last-updated: 2026-07-23
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/ContinuousDelivery?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Publishing test data to DevOps Insights
{: #publishing-test-data}

DevOps Insights will reach end of service and be discontinued on **August 31, 2026**. After this date, the service will no longer be available. New DevOps Insights tool integrations can no longer be created. [Learn more](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-faq_region_feature_consolidation&format=markdown)
{: important}

Users can upload test results to IBM Cloud&reg; DevOps Insights from any continuous integration and continuous delivery (CI/CD) tools and see all of those test results in the DevOps Insights Quality Dashboard page. A CI/CD tool refers to tools like Jenkins, Travis CI, and IBM&reg; Continuous Delivery Pipeline for IBM Cloud&reg; that are used to create builds, run tests, and perform deployments.
{: shortdesc}

For more information about the Quality Dashboard page, see [DevOps data aggregation](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-aggregating-multiple-sources&format=markdown#devops-data-aggregation).


## Supported test data format in DevOps Insights
{: #supported-test-data}

The following table showed a list of supported tests and formats.

| Display Label                 | Data Type             | Supported Data Formats and File Extension                  |
|-------------------------------|-----------------------|------------------------------------------------------------|
| Unit Tests                    | Test Case             | JUnit (JSON), xUnit (xml), Mocha (JSON), KarmaMocha (JSON) |
| Code Coverage                 | Code Coverage         | Cobertura (xml), lcov (info), JaCoCo (xml)|
| Functional Verification Tests | Test Case             | JUnit (JSON), xUnit (xml), Mocha (JSON), KarmaMocha (JSON) |
| SonarQube                     | SonarQube             | SonarQube                                                  |
| Dynamic Security Scan         | Dynamic Security Scan | IBM Cloud&reg; Application Security (xml)   |
| Static Security Scan          | Static Security Scan  | IBM Cloud&reg; Application Security (xml)   |
| Vulnerability Advisor         | Vulnerability Advisor | Vulnerability Advisor (JSON)                               |
{: caption="Default DevOps Insights data sets" caption-side="top"}


## Uploading test case results
{: #upload-test-case}

To upload unit tests, functional verification tests or custom test data, use the following command:

```text
ibmcloud doi testrecord-publish --logicalappname "$MY_APP_NAME" --buildnumber "$MY_BUILD_NUMBER" --filelocation "./test-sample-folder/unit_test_mocha.json" --type=unittest
```
{: codeblock}

For a sample test result files that you can upload to DevOps Insights, see [this GitHub repository with dummy data](https://github.com/devops-insights/example-upload-data-format){: external}. 


## Uploading Code Coverage Results
{: #upload-code-coverage}

To upload Code Coverage results or custom code data, use the following command:

```text
ibmcloud doi testrecord-publish --logicalappname "$MY_APP_NAME" --buildnumber "$MY_BUILD_NUMBER" --filelocation "./test-sample-folder/code_coverage_cobertura.xml" --type=code
```
{: codeblock}

For a sample test result files that you can upload to DevOps Insights, see [this GitHub repository with dummy data](https://github.com/devops-insights/example-upload-data-format){: external}.


## Uploading IBM Application Scan reports
{: #upload-app-scan}

Users can get the report from the IBM AppScan CLI tool. Scan the application from the CLI to get the results in compressed file format.

```text
appscan.sh get_result -i $job_id -d "$APPSCAN_SCAN_NAME.zip" -t zip
```
{: codeblock}

Unzip the results in a folder and go to that folder, then upload a file called Report-final.xml

```text
ibmcloud doi testrecord-publish --logicalappname "$MY_APP_NAME" --buildnumber "$MY_BUILD_NUMBER" --filelocation "./Report-final.xml" --type staticsecurityscan
```
{: codeblock}

Change the type to `dynamicsecurityscan` if the report is from a dynamic scan.


## Uploading SonarQube results
{: #upload-sonarqube}

To upload data from SonarQube, you must provide the SonarQube server token by using `--token`. Your SonarQube server is required to be accessible from your CI/CD tool.

After you run a scan by using SonarQube, you can upload SonarQube results by running this command.

```text
ibmcloud doi testrecord-publish --logicalappname "$MY_APP_NAME" --buildnumber "$MY_BUILD_NUMBER" --filelocation ".scannerwork/report-task.txt" --type=sonarqube --token=$SONARQUBE_TOKEN
```
{: codeblock}

report-task.txt is a file that is generated during the SonarQube scan.


## Uploading IBM Vulnerability Advisor results
{: #upload-vulnerability-advisor}

To get the result of the vulnerability advisor scan from the CLI, use the following command:

```text
ibmcloud cr va ${PIPELINE_IMAGE_URL} -o json > vulnerability_advisor.json
```
{: codeblock}

You can get your image's repository and tag from the Vulnerability Advisor UI or in the CLI by using `ibmcloud cr image-list`. DevOps Insights accepts only the JSON output. You can upload Vulnerability Advisor output file to DevOps Insights by running this command.

```text
ibmcloud doi testrecord-publish --logicalappname "${APP_NAME}" --buildnumber "${BUILD_NUMBER}" --filelocation "vulnerability_advisor.json" --type vulnerabilityadvisor
```
{: codeblock}