# Auto Defect Creation

Auto Defect Creation in Avo Assure automatically logs defects into JIRA whenever a Test Step fails during execution. It captures failure details like step info, logs, and screenshots, and links the JIRA defect ID back to the Test Step. &#x20;

## Prerequisites

User must ensure the following requirements are fulfilled before proceeding with Jira integration in Avo Assure.&#x20;

### Cloud Authentication Prerequisites

For the cloud authentication, here are the prerequisites:

* **Jira Credentials:** Keep Jira login credentials ready to use during authentication.
* **Jira API token:** Generate the Jira API token and store it securely for use during authentication.
* **Jira Instance URL:** Ensure the Jira URL is correct and accessible to use during authentication.
* **Avo Integrator:** Ensure the Avo Integrator extension is downloaded in the browser. This required for Login, Mapping, and Execution Configuration in Avo Assure.

{% hint style="info" %}
**Note:** To integrate with Jira without using the Avo Assure Client, user can install the Avo Integrator Extension in user's browser and perform the integration. For installation steps, refer to [Avo Integrator](https://docs.avoautomation.com/integrations-in-avo-assure/avo-integrator).
{% endhint %}

* **Avo Assure Client:** Ensure Avo Assure client is connected and it's required for executing the test case and update status in Jir&#x61;**.**
* **Mapping Zephyr Scale/Xray Test case:** Ensure to map Zephyr Scale/Xray Test Case to auto create defect for failed Test step while execution.

{% hint style="info" %}
**Note:** Refer to the document below to learn more about Zephyr Scale and Xray Integration.

* For **Zephyr Scale**, refer to [Zephyr Scale](https://docs.avoautomation.com/integrations-in-avo-assure/zephyr-scale)
* For **Xray**, refer to [Xray](https://docs.avoautomation.com/integrations-in-avo-assure/xray)
  {% endhint %}

### Data Center Authentication Prerequisites

For the data center authentication, here are the prerequisites:

* **Username:** Ensure the Jira Username is ready to use during authentication.
* **PAT token:**  Generate the PAT (Personal Access token) token and store it securely for use during integration.
* **URL for Jira instance:**  Ensure the Jira URL is correct and accessible to use during authentication.
* **Avo Integrator:** Ensure the Avo Integrator extension is downloaded in the browser. This required for Login, Mapping, and Execution Configuration in Avo Assure.

{% hint style="info" %}
**Note:** To integrate with Jira without using the Avo Assure Client, user can install the Avo Integrator Extension in user's browser and perform the integration. For installation steps, refer to [Avo Integrator](https://docs.avoautomation.com/integrations-in-avo-assure/avo-integrator)
{% endhint %}

* **Mapping Zephyr Scale/Xray Test case:** Ensure to map Zephyr Scale/Xray Test Case to auto create defect for failed Test step while execution.&#x20;

{% hint style="info" %}
**Note:** Refer to the document below to learn more about Zephyr Scale and Xray Integration.

* For **Zephyr Scale**, refer to [Zephyr Scale](https://docs.avoautomation.com/integrations-in-avo-assure/zephyr-scale)
* For **Xray**, refer to [Xray](https://docs.avoautomation.com/integrations-in-avo-assure/xray)
  {% endhint %}

### This document includes:

1. [Template Creation](https://docs.avoautomation.com/integrations-in-avo-assure/jira-integration/auto-defect-creation/template-creation)
2. [Configuration and Execution Test Cases](https://docs.avoautomation.com/integrations-in-avo-assure/jira-integration/auto-defect-creation/configuring-and-executing-test-case)
3. [View Defect ID in Avo Assure Reports](https://docs.avoautomation.com/integrations-in-avo-assure/jira-integration/auto-defect-creation/view-defect-id-in-avo-assure-reports)
4. [View Auto Created Defect in Jira](https://docs.avoautomation.com/integrations-in-avo-assure/jira-integration/auto-defect-creation/view-auto-created-defect-in-jira)

&#x20;
