# Working with Heatmap

> Heatmap workflow in Test Manager for Automation Suite, spanning Studio test case creation, ratio configuration, transaction examination, and test set execution.

This page guides you through the user journey of interacting with the Heatmap. The page leads you through various stages, including creating test cases in Studio, setting up Heatmap ratios and configurations, examining and testing transactions, and running test sets. Check the following topics to start using the Heatmap.

You work with a two-level heatmap view:

* **Application components**: Visual containers that group related SAP transactions under a specific component or module.
* **Transactions**: Boxes inside components representing individual SAP transactions or programs. Eachbox displays transaction data, such as:
  + Transaction name
  + SAP code
  + Testing status and coverage

## Create test cases in Studio

To get started with the Heatmap, you need to create test cases for your SAP transactions with UiPath Studio. To ensure the Heatmap accurately shows which transactions are covered by tests and their status, you need to set the Studio project **Enable SAP monitoring** setting to **True**.

### Linkage and connection between heatmap, test cases and transactions

All transactions inside the heatmap have a unique label automatically assigned to them at runtime. The label has the following format: `TRAN:SAP_CODE` or `PROG:SAPPROGRAM`.

The information about real executed transactions and their dependencies are collected at runtime. To allow test cases to link to the executed transactions, go to your Studio project settings, and under **UI Automation Classic**, set **Enable SAP monitoring** to **True**.

This setting is available only for **Test Automation** projects.

:::note
Enabling SAP monitoring under **UI Automation Classic** will also link test cases and transactions for UI Automation modern activities.
:::

For example, a transaction named `Create Purchase Order`, with `ME21N` as its SAP code, has the `TRAN:ME21N` label. If you want to create a test case for this transaction, the same label appears in the **Labels** field of the **Create Test Case** dialog box.

![Create Test Case dialog showing transaction label](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-138149-8faa3791-5c13884b.webp)

## Configure Heatmap ratios and settings

After you create test cases in UiPath Studio for your SAP transactions, you can configure the ratios and settings based on which the Heatmap will display the test relevance and coverage.

### Changing the heatmap settings

The Heatmap is generated based on the values of five SAP attributes. You can configure the assignment ratios to prioritize the attributes most relevant to your testing strategy.

 <colgroup>
  <col/>
  <col/>
  <col/>
 </colgroup>
 
  
    SAP attribute 
    Description 
    Default value 
  
 
 
  
    Users 
    The number of users using the transaction. 
    <code>40</code> 
  
  
    Execution 
    The number of executions per transaction. 
    <code>10</code> 
  
  
    Time 
    The overall processing time it takes for a transaction to execute. 
    <code>10</code> 
  
  
    Object 
    The number of development objects used in a transaction, such as screens, functional modules, tables. 
    <code>10</code> 
  
  
    Intensity 
    The type of transaction:
      
         High intensity transactions are considered the Create type of transaction 
         Medium-intensity transactions are considered the Change type of transactions 
         Low-intensity transactions are considered the Display type of transactions) 
      

    <code>30</code> 
  
 

:::important
The sum of all assignment ratios must equal `100`. #### SAP FIORI landing pages Additionally, you can enable or disable the **Visibility** of **SAP Fiori landing pages** in the heatmap.
:::

#### Direct connection to SAP instance

Adjust the Heatmap assignment ratios and SAP Fiori landing page visibility settings to tailor how test relevance and coverage are calculated and displayed.

1. Select the gear icon ![gear icon](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-settings_button-fe5faa6e-1b140803.png) in the top-right to open the **Heatmap settings**.
2. Change the assignment ratios according to your use case.

   For example, to highlight the most intense transactions (of type **Create**), rather than the most used ones, change the **User** ratio to `10`, and then the **Intensity** ratio to `60`.
3. Under **Visibility**, select the **Display SAP FIORI landing pages** toggle, to display SAP FIORI landing pages in the heatmap.

![Heatmap settings panel with assignment ratios and SAP Fiori landing page visibility toggle](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-326222-26354c35-ae723445.webp)

#### Connection with CSV file

After you run the `Z_UIPATH_CUST_HEATMAP_DOWNLOAD` program, go in the **Parameters** tab and configure the ratios.

![Parameters tab for configuring Heatmap ratios](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-254837-a0866176-83eac149.webp)

## Analyze and test transactions

After you create tests for your SAP transactions, and configure the Heatmap ratios, you can start analyzing the results and testing specific transactions. Check the following sections for information on how to leverage the Heatmap.

### Understanding the Heatmap results

The analysis of Heatmap results involves viewing the test coverage of your transactions, filtering test coverage types, and reviewing transaction overviews. Explore the following topics to gain a comprehensive understanding of how to examine Heatmap results.

#### Viewing test coverage for transactions

To see which transactions have automated tests, and the results:

1. Under the heatmap, select **Passed** to see the transactions that passed their test results.
2. Under the heatmap, select **Failed** to see the transactions that failed their test results.
3. Under the heatmap, select **No test case executed** to see the transactions for which no test case was executed.
4. Under heatmap, select **No test case assigned** to see the transactions that don't have any test cases assigned to them.
5. Under heatmap, select **Show all** (selected by default) to see all the above transactions.

![Heatmap transaction coverage filter buttons](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-302250-77e78170-f1662fae.webp)

#### Filtering heatmap transactions

Narrow the set of transactions displayed in the Heatmap by applying filters for the number of top transactions, time period, transaction type, and interface type.

1. Open **Heatmap** and select the number of transactions you want to appear from the **All Transactions** dropdown:
   1. **All transactions** (default)
   2. **Top 10 transactions**
   3. **Top 20 transactions**
2. Select the start time for transactions from the **Last week** dropdown:
   1. **Last Month** (default)
   2. **Last Week**
   3. **Last Day**

      The start and end time of transactions is displayed next to the **Time Period** dropdown. 3. Select the types of transactions that you want to appear from the **All transaction types** dropdown:
   1. **Standard transactions**
   2. **Custom transactions**
4.

Select the types of interfaces where you want to see transactions from the **All interface types** dropdown:
   1. **[T] - Transaction in SAP WinGui**
   2. **[R] - Report/Program in SAP WinGui**
   3. **[W] - Transaction in SAP WebGui**
   4. **[F] - Application in SAP Fiori**

#### Checking the overview of a transaction

View the name and SAP code of a specific transaction selected in the Heatmap to confirm its identity before creating test cases or test sets for it.

1. Select a transaction from the heatmap.
2. Under **Details of selected transaction: Maintain Transaction Codes**, select **Overview**
3. Check out the **Transaction Name** and its SAP **Code**.

   The SAP **Code** of a transaction is used to generate a unique label

![Heatmap transaction overview showing Transaction Name and SAP Code](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-252591-c430f1c0-d157039c.webp)

### Generating test cases for a specific transaction

You can generate manual tests using Autopilot for transactions viewed as part of the Heatmap. For the full procedure, including prerequisites, RAG/Context Grounding options, and refining generated tests, see [Generate tests for SAP transactions](https://docs.uipath.com/autopilot/other/latest/user-guide/create-sap-transactions).

### Creating test cases and test sets

After you analyze the results displayed in the Heatmap, you can start improving your testing portfolio, by creating test cases and test sets for uncovered or failed transactions. Check the following pages for steps on creating test cases and test sets for a specific transaction.

#### Creating test cases for a specific transaction

All transactions inside the heatmap have a unique label automatically assigned to them at runtime. The label has the following format: `TRAN:SAP_CODE` or `PROG:SAPPROGRAM`.

The information about real executed transactions and their dependencies are collected at runtime. To allow test cases to link to the executed transactions, go to your Studio project settings, and under **UI Automation Classic**, set **Enable SAP monitoring** to **True**.

This setting is available only for **Test Automation** projects.

:::note
Enabling SAP monitoring under **UI Automation Classic** will also link test cases and transactions for UI Automation modern activities.
:::

For example, a transaction named `Create Purchase Order`, with `ME21N` as its SAP code, has the `TRAN:ME21N` label. If you want to create a test case for this transaction, the same label appears in the **Labels** field of the **Create Test Case** dialog box.

1. Select a transaction from the heatmap.
2. Under **Details of selected transaction: Maintain Transaction Codes**, select **Test Cases**.
3. Select **Create Test Case** and configure the test case that you want to create.

   You can add other labels next to the one already assigned to the test case.
   :::important
   When you create a test case for a specific transaction, make sure you leave the label already assigned to the transaction untouched. Otherwise, the test case that you create won't be linked to the transaction. For this example, the label that is already assigned is `TRAN:SE16`.
   :::

![Create Test Case dialog with transaction label pre-assigned](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-138187-27b9c2f2-cc75e6d2.webp)

#### Creating test sets for a specific transaction

Create a test set for a specific Heatmap transaction so you can group and execute the test cases that cover it.

1. [Create test cases for a specific transaction](https://docs.uipath.com/test-manager/automation-suite/2.2510/user-guide/working-with-heatmap#creating-test-cases-for-a-specific-transaction).
2. Select the transaction for which you created the test cases.
3. Under **Details of selected transaction: Maintain Transaction Codes**, select **Test Sets**, and configure the test set that you want to create.
   :::tip
   To ease the process of linking a test set to a transaction, add the label of the transaction to the test set that you want to link. This way you can search for the test set you just created, using that specific label. For this example, the same label we used to create the test cases (`TRAN:SE16`) we added to the test set.
   :::

   ![Test set configuration linked to a Heatmap transaction](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-138183-2b51e7fc-37d4b3bb.webp)
4. After you create the test set, navigate to **Test Sets** in Test Manager.
5. Search for the test set you created and open it.

   You can search for the test set using the label that you added at Step 3.
6. Select **Tasks** &gt; **Assign Test Cases** &gt; **Static Assignment**.
7. Search for the test cases that you created at Step 1 and assign them to this test set.

   ![Test cases assigned to a test set in Test Manager](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-138230-4282a599-eec0db0a.webp)
8. Navigate back to the **Heatmap** page, select the transaction, and check out the test set assigned to it.

### Linking Orchestrator test set to a transaction

Link an Orchestrator test set to a SAP transaction to run automated tests against that transaction directly from the heatmap.

1. Select a transaction, and under **Details of selected transaction: Maintain Transaction Codes**, select **Test Sets**.
2. Select **Link**, choose the Orchestrator test sets that you want to link, and select **Link**.

## Execute test sets for a transaction

Run a test set that is linked to a specific Heatmap transaction so the test results are reflected back in the Heatmap as test coverage for that transaction.

1. Link a test set to a transaction.
2. Select **More Options** inline with the test set that you want to execute.
3. Select one of the following:
   * **Execute Manually**
   * **Execute Automated**
4. Check out the test results in the heatmap.

## Heatmap attachments

The SAP data that generates the heatmap can be found in Test Manager's **Dashboard**, under **Attachments**:

* For **ConnectSapInstance** as **Data Source**: three JSON files are attached (for **Day**, **Week** and **Month**)
* For **UploadFromCSV** as **Data Source**: the uploaded CSV file is attached.

## Result

The test sets are executed for the selected transactions and the results are reflected in the Heatmap. Transactions with passing tests display in the corresponding coverage state, and test case logs are available in the **Execution** section of your project.
