# Azure DevOps (ADO) Integration: Streamline Bug Tracking

These instructions detail how to integrate Ratl with Azure DevOps for efficient bug tracking. Automatically raise bugs with detailed test failure information, including logs and reports, directly from Ratl into your ADO project for seamless issue management.

## Creating a Personal Access Token (PAT) in Azure DevOps (ADO)

Personal Access Tokens (PATs) are a secure way to authenticate to Azure DevOps (ADO) when accessing resources through APIs, tools, or other clients. This guide outlines the steps required to create a PAT in Azure DevOps.

### Prerequisites

* An active Azure DevOps organization.
* Sufficient permissions to manage personal tokens.
* A valid Microsoft account linked to Azure DevOps.

### Steps to Create a PAT

**1. Sign in to Azure DevOps**

* Navigate to <https://dev.azure.com>.
* Sign in using your Microsoft credentials.

**2. Access User Settings**

* Click on your profile picture or initials in the upper-right corner.&#x20;
* Select Personal Access Tokens from the dropdown.&#x20;

<figure><img src="/files/FHVFrZNqpGzv19154R8O" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/uUIxZTz651niItk8YgKX" alt=""><figcaption></figcaption></figure>

**3. Generate a New Token**

* On the Personal Access Tokens page, click on + New Token.&#x20;

<figure><img src="/files/gd2WB9dexcvzdbgzwE0m" alt=""><figcaption></figcaption></figure>

* Fill in the following details:
  * Name: A descriptive name for the token (e.g., "API Access Token").
  * Organization: Choose the organization the token will be associated with.
  * Expiration: Set the token's expiration date (default is 30 days, but you can select up to 1 year).
  * Scopes: Choose the appropriate level of access for the token.
  * Full Access: Grants complete access to all resources.
  * Custom Defined: Select specific areas such as Build, Work Items, or Repos.
* Click Create.&#x20;

<figure><img src="/files/KfFjopTU9HG2llB1wTCN" alt=""><figcaption></figcaption></figure>

**4. Save the Token**

* After the token is generated, copy it immediately and store it securely (e.g., in a password manager).

<figure><img src="/files/rgYEkHRnU9lHLMcYNlz0" alt=""><figcaption></figcaption></figure>

Important: You will not be able to view the token again after closing the page.

**5. Add the PAT Token In RATL Integrations**

<figure><img src="/files/UGt308aEwI7QiiM9TnEk" alt=""><figcaption></figcaption></figure>

* Navigate to the ADO Integration section in RATL.
* Fill in all required information, including:
  * Organization: Enter the name of your Azure DevOps organization.
  * Workspace: Specify the workspace to integrate.
  * Token: Paste the newly generated PAT token.
  * User Email: Provide the associated user email.
* Click on Apply changes and select the project you want to add.

### Raising Bugs in Azure DevOps

Note - Using the scenario for Functional Test

<figure><img src="/files/Vg3OM22OWyVkxC6OTLdK" alt=""><figcaption></figcaption></figure>

1. Open the suite listing page and select the suite for which you want to raise an issue.
2. Ensure that the bug is raised for test cases that have failed.
3. Locate the test case with a Failed status and click the ellipse (three dots) icon.
4. Select **Report ADO** from the dropdown menu. A dialog box will appear with the project and bug description pre-filled.&#x20;
5. Click Submit. A toast message will confirm submission, displaying the work item ID. The Azure DevOps icon will become active in the test case list, allowing direct access to the bug by clicking the icon.&#x20;

<figure><img src="/files/fSE0WtOApVjW61JHSe1r" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Kz8Fe5PdZjg1FVTHEdIi" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ratl.ai/guide/integrations/ado.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
