---
title: "AI Test Prioritization"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/1701117953/AI%20Test%20Prioritization"
format: markdown
---
> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> > Macro (toc)

# Introduction

AI Test Prioritization, powered by Sembi IQ, uses input data to intelligently suggest optimized, prioritized [Test Plans](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565153)/[Executions](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117) to maximize your Testing efficiency.

## Factors Used in AI Test Prioritization

AI Test Prioritization uses multiple inputs to determine the most relevant and efficient order for Tests within a Test Plan or Test Execution. The prioritization is based on a combination of the following factors:

- **User prompt: **the input provided to guide prioritization.
- **Selected labels: **up to three labels used to refine the scope and focus of the prioritization.
- **Test content: **information from the Test summary and description fields.
- **Categorical values: **Test metadata such as Test type, kind, labels, component, priority, and status.
- **Historical data:**
  - Associated [Test Runs](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565109).
  - Recent failure rate.
  - Overall failure rate.
  - Test flakiness.
  - Recency of last execution.
  - Recency of last failure.
  - Estimated effort or duration.

## Requirements and Prerequisites

- You must have [Xray already installed](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44566344) on your Jira Cloud instance.
- Configuration and enablement (via [AI Hub](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/1241974430)) is available for Jira Admins only. More below.

# Operations

## Management and Configuration

The AI Test Prioritization feature can be enabled/disabled by Jira Admins via the [AI Hub](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/1241974430) enablement toggle (Figure 1 - 1) at the Global settings level.

![Figure 1 - Toggle](media://5c113b90-4289-40fd-9ea4-0bae0eb366b2)

Once you’ve enabled the toggle (Figure 1 - 1), you may activate it for:

- *All users* (Figure 1 - 2).
- *Specific groups* (Figure 1 - 3).

## Using AI Test Prioritization

> ℹ️ - AI Test Prioritization only works on the [Test Plans](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565153) and [Test Execution](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565117) Work items.
> ℹ️ - The limits (number of Tests) of the usage of this feature vary according to the [Xray tiers](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/392921546):
> ℹ️   - **Xray Standard**: maximum of 75.
> ℹ️   - **Xray Advanced**: maximum of 150.
> ℹ️   - **Xray Enterprise**: maximum of 300.

### Via a Work Item

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Go to your Test Work item (Figure 2) and click *Prioritize Tests* (Figure 2 - 1).
> 
> ![Figure 2 - Prioritization.png](media://9f6a4173-598e-4a07-a28b-65d2bc3849ab)
> 
> Here, you can:
> 
> - Write your prompt in the box (Figure 2 - 1), describing how Sembi IQ should prioritize your Tests.
> - Click the *Settings* icon (Figure 2 - 5), which opens a dropdown menu, allowing you to determine the analysis timeframe and select labels.
> 
> > ℹ️ - AI Test Prioritization analyzes each test case using multiple factors, including historical Test Run data and associated defects. Use the **analysis timeframe** setting to control how far back Sembi IQ looks when processing this data - any data older than the defined timeframe is excluded from the analysis. A longer timeframe increases the amount of data processed and may extend the duration of the prioritization run.
> > ℹ️ - You can also define up to three Jira labels. Tests containing any of these labels receive a slight boost to their priority score, letting you carry forward any existing prioritization efforts.
> 
> - Click the *Close* icon (Figure 2 - 3) anytime to cancel the interaction.
> 
> > Macro (rw-step)
> 
> Once you’re ready, click *Run Prioritization* (Figure 2 - 4).
> 
> > Macro (rw-step)
> 
> The AI Test Prioritization tool will analyze your prompt and interpret the testing scope (Figure 3 - 1). 
> 
> ![Figure 3 - Cancel](media://fccc173e-e960-4e51-9c6e-74741019f22f)
> 
> > Macro (rw-step)
> 
> **Canceling the Process**
> 
> You can quit the process by clicking *Cancel* (Figure 3 - 2). A modal will open (Figure 4).
> 
> > Macro (rw-step)
> 
> Click *Yes, cancel* (Figure 4 - 1) to confirm the cancellation or *No, resume priorization* (Figure 4 - 2) to go back.
> 
> ![Figure 4 - Cancel.png](media://cb661f37-0b59-4af6-b182-701654c7e17d)
> 
> > Macro (rw-step)
> 
> You will see a message confirming that the AI Prioritization process has been cancelled (Figure 5 - 1).
> 
> ![Figure 5 - Cancel](media://03d313c4-c331-4f33-b478-6d7ca9ab0fda)
> 
> 
> > Macro (rw-step)
> 
> **Proceeding with the Process**
> 
> The results will appear in the AI Priority column (Figure 6 - 1), and the Tests are re-ranked in priority order top down, based on Sembi IQ's analysis.
> 
> You can hover over a label to see more details (Figure 6 - 1); this helps you understand some of the factors in the prioritization and why Sembi IQ assigned the priority values it did.
> 
> ![Figure 6 - Results](media://9ab45402-7745-45a6-8210-1adff72a8f9a)
> 
> > Macro (rw-step)
> 
> After each use, Xray logs an entry in the History tab (Figure 7 - 1), giving all users visibility into the changes applied to the Test Plan or Test Execution. The entry also includes a high-level overview of the prioritization strategy applied by Sembi IQ (Figure 7 - 2).
> 
> ![Figure 7 - History](media://0bb44c1b-5c3d-4653-9114-02e0185869bf)
> 
> 
> > ⚠️ While the AI Prioritization feature is running for a Test Plan or Test Execution, the user is free to stay on the page or navigate away and return later. This will have no impact on the ongoing AI Prioritization.

### Via the Testing Board

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Go to the Test Plans or Test Executions menu within the [Testing Board](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565285), open one of the work items, and click *Prioritize Tests* (Figure 8 - 1).
> 
> ![Figure 8 - Testing board](media://38a42d8a-286b-4c7b-98bd-1f58663c2ac1)
> 
> 
> > Macro (rw-step)
> 
> Write your prompt in the box (Figure 8 - 2), describing how Sembi IQ should prioritize your Tests.
> 
> > Macro (rw-step)
> 
> Once you’re ready, click *Run Prioritization* (Figure 8 - 3).
> 
> > Macro (rw-step)
> 
> The AI Test Priorization tool will analyse your prompt and define its scope (Figure 9 - 1). 
> 
> ![Figure 9 - Analyze](media://c2a1fc3f-2eb8-4aad-a01c-2d4931ca1376)
> 
> > Macro (rw-step)
> 
> The results will appear (Figure 10 - 1), and the Tests are re-ranked in priority order top down, based on Sembi IQ's analysis.
> 
> You can hover over a label to see more details (Figure 10 - 2); this helps you understand some of the factors in the prioritization and why Sembi IQ assigned the priority values it did.
> 
> ![Figure 10 - Results](media://7aadb479-f4a0-43f5-b344-290e20c7a07f)


> Macro (rw-ui-expands-macro)
> 
> > Macro (rw-expand)
> 
> If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577312).