---
title: Enhancing Developer Workflows with Datadog
description: >-
  Learn how to use Datadog Test Optimization with additional Datadog features to
  accelerate your development process.
breadcrumbs: >-
  Docs > Test Optimization in Datadog > Enhancing Developer Workflows with
  Datadog
---

# Enhancing Developer Workflows with Datadog

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site). ().
{% /alert %}

{% /callout %}

## Overview{% #overview %}

[Test Optimization](https://docs.datadoghq.com/continuous_integration/tests/) integrates with other developer-oriented Datadog products as well as external partners such as GitHub to streamline developer workflows with features including being able to:

- Enable test summaries in GitHub pull request comments
- Create and open GitHub issues
- Create Jira issues through Case Management
- Open tests in GitHub and your IDE

These features are available for all Test Optimization customers, and they do not require usage of the [Datadog GitHub integration](https://docs.datadoghq.com/integrations/github/).

## Test summaries in GitHub pull requests{% #test-summaries-in-github-pull-requests %}

Test Optimization integrates with GitHub to show summaries of test results directly in your pull request comments. Each summary contains an overview of the tests executions, flakiness information, and error messages for failed tests.

{% image
   source="https://datadog-docs.imgix.net/images/ci/github_comments_light.6bff177173796c763df0fa67d3e573d6.png?auto=format"
   alt="Datadog GitHub pull request comment preview" /%}

With this information, developers get instant feedback about their tests results, and they can debug any failed or flaky tests without leaving the pull request view.

{% alert level="info" %}
This integration is only available for test services hosted on `github.com`.
{% /alert %}

## Enable test summaries{% #enable-test-summaries %}

You can enable test summaries in pull requests with the following steps:

1. Install the [GitHub integration](https://docs.datadoghq.com/integrations/github/):
   1. Navigate to the **Configuration** tab on the [GitHub integration tile](https://app.datadoghq.com/integrations/github) and click **+ Create GitHub App**.
   1. Give the application read and write permissions for pull requests.
1. Navigate to the [Test Optimization Settings page](https://app.datadoghq.com/ci/settings/test-optimization).
1. Select the repository where you want to enable test summaries.
1. Toggle **GitHub Comments**.

{% image
   source="https://datadog-docs.imgix.net/images/ci/enable-settings-github-comments.c83eefba0fac8249f05f056cd55b09a3.png?auto=format"
   alt="The Test Optimization Settings tab in Datadog with GitHub comments enabled for one test service" /%}

Comments only appear on pull requests that have run at least one test for an enabled repository.

## Create and open GitHub issues{% #create-and-open-github-issues %}

With Test Optimization, you can create and open pre-filled GitHub issues with relevant context into your tests as well as deep links back to Datadog for more streamlined debugging workflows. Creating issues directly from Test Optimization can help you track and maintain accountability for test failures and flaky tests.

### In-app entry points{% #in-app-entry-points %}

You can create pre-filled GitHub issues from three areas within Test Optimization:

- Commit Overview page (from the **Commits** table)
- Branch Overview page
- Test Details side panel

#### Commit Overview{% #commit-overview %}

The overview page for any commit can be discovered through a particular branch or from within any particular test.

{% image
   source="https://datadog-docs.imgix.net/images/ci/github_issues_commit_overview_updated.bd9fda490b59ca9b36cb5d8cf86f67f8.png?auto=format"
   alt="Datadog GitHub issues preview" /%}

From the Commit Overview page, click on any row in the `Failed Tests` or `New Flaky Tests` tables and select **Open issue in GitHub**.

#### Branch Overview{% #branch-overview %}

From this page, click on any row in the **Flaky Tests** table and select **Open issue in GitHub**.

{% image
   source="https://datadog-docs.imgix.net/images/ci/github_issues_flaky_test_updated.9797ed83b5fbeb8ae2051a47303f571d.png?auto=format"
   alt="Datadog GitHub issues flaky tests table preview" /%}

#### Test Details View{% #test-details-view %}

From within a specific test run, click the **Actions** button and select **Open issue in GitHub**.

{% image
   source="https://datadog-docs.imgix.net/images/ci/github_issues_detail_light.0c28a5115083240de682eae7595773c6.png?auto=format"
   alt="Datadog GitHub issues test detail view preview" /%}

You also have the option to copy an issue description in Markdown for pasting test details elsewhere. The Markdown description contains information such as the test execution link, service, branch, commit, author, and error.

{% image
   source="https://datadog-docs.imgix.net/images/ci/github_issues_markdown.3e98bf7bc5e568535bbf48b82901ad9b.png?auto=format"
   alt="Copy issue description in Markdown format for GitHub issues" /%}

### Sample GitHub issue{% #sample-github-issue %}

Below is what a pre-filled GitHub issue might look like:

{% image
   source="https://datadog-docs.imgix.net/images/ci/prefilled_github_issue.247895fe7dc888df4278586363daa41d.png?auto=format"
   alt="Pre-filled GitHub issue" /%}



## Create Jira issues{% #create-jira-issues %}

With [Case Management](https://docs.datadoghq.com/incident_response/case_management/view_and_manage#take-action), you can create and open pre-filled Jira issues that contain relevant context related to your tests, as well as deep links back to Datadog for more streamlined debugging workflows. Creating issues directly from Test Optimization can help you track and maintain accountability for test failures and flaky tests.

When you update the status of a Jira issue, the status in Case Management updates and reflects the latest case status.

### In-app entry points{% #in-app-entry-points-1 %}

After you have [set up the Jira integration](https://docs.datadoghq.com/incident_response/case_management/settings/#jira), you can create cases from three areas within Test Optimization:

- Commit Overview page (from the **Commits** table)
- Flaky Tests section
- Test Runs side panel

You can manually create a Jira issue from a case in [Case Management](https://app.datadoghq.com/cases) by clicking `Shift + J`.

### Commit Overview{% #commit-overview-1 %}

The overview page for any commit can be discovered through a particular branch or from within any particular test.

{% image
   source="https://datadog-docs.imgix.net/images/continuous_integration/case_failed_test.c52b316cf4f7cb79af173e672de2a97b.png?auto=format"
   alt="Create a Case Management issue in the Commit Overview page" /%}

From the Commit Overview page, click on any row in the `Failed Tests` or `New Flaky Tests` tables and select **Create case**.

#### Branch Overview{% #branch-overview-1 %}

From this page, click on any row in the **Flaky Tests** table and select **Create case**.

{% image
   source="https://datadog-docs.imgix.net/images/continuous_integration/case_flaky_test.a8087f711ad114862d66ecf5f16268c4.png?auto=format"
   alt="Create a Case Management issue in the Flaky Tests list" /%}

#### Test Runs View{% #test-runs-view %}

From within a specific test run, click the **Actions** button and select **Create case**.

{% image
   source="https://datadog-docs.imgix.net/images/continuous_integration/case_test_runs.84ea159ee986578aa4d2916f8ecf9699.png?auto=format"
   alt="Create a Case Management issue in the Test Runs side panel" /%}

For more information about configuring the Jira integration, see the [Case Management documentation](https://docs.datadoghq.com/incident_response/case_management/settings/#jira).

## Open tests in GitHub and your IDE{% #open-tests-in-github-and-your-ide %}

### In-app entry points{% #in-app-entry-points-2 %}

After detecting a failed and/or flaky test within Datadog, you have the option to open that test in GitHub or your IDE to fix it immediately.

Under the **Error Message** section in the **Overview** tab of a test run, click the **View Code** button to view the relevant lines of code for that test within Visual Studio Code, IntelliJ, or GitHub.

{% image
   source="https://datadog-docs.imgix.net/images/continuous_integration/error_message_code.021da4cbf214c236a07ed8cc5d1e8d86.png?auto=format"
   alt="An inline code snippet with a button you can click to view the source code in GitHub or an IDE" /%}

The order of options in this dropdown changes depending on the language your test was written in:

- IntelliJ is prioritized for Java-based tests
- Visual Studio Code is prioritized for JavaScript and Python-based tests

### Viewing source code in GitHub{% #viewing-source-code-in-github %}

Optionally, you can set up the [GitHub integration](https://docs.datadoghq.com/integrations/github/#link-a-repository-in-your-organization-or-personal-account) to open the source code for a failed or flaky test in GitHub.

Under the **Source Code** section in the **Overview** tab of a test run, click the **View on GitHub** button to view the relevant lines of code for that test within GitHub.

{% image
   source="https://datadog-docs.imgix.net/images/continuous_integration/source_code_integration.28796b83da4d7a86bf6e1075bf0222af.png?auto=format"
   alt="An inline code snippet with a button you can click to view the source code in GitHub or an IDE" /%}

### Installing IDE plugins{% #installing-ide-plugins %}

IDE plugins and extensions are required to view your test in your IDE.

- If you do not have the VS Code extension installed, click **View in VS Code** to open the extension directly in VS Code for installation.
- If you do not have the IntelliJ plugin installed, click **View in IntelliJ** to get the extension installation. Compatible Datadog versions can be found on the [Plugin Versions page](https://plugins.jetbrains.com/plugin/19495-datadog/versions).

## Further reading{% #further-reading %}

- [Monitor your GitHub Actions workflows with Datadog CI Visibility](https://www.datadoghq.com/blog/datadog-github-actions-ci-visibility/)
- [Learn about the GitHub Integration](https://docs.datadoghq.com/integrations/github/)
- [Learn about the Source Code Integration](https://docs.datadoghq.com/integrations/guide/source-code-integration)
- [Learn about Case Management](https://docs.datadoghq.com/incident_response/case_management)
