# Troubleshooting performance testing

> Common errors and solutions for performance testing failures in Test Manager, including selector issues, package mismatches, and robot connection problems.

## Selector not found

**Solution**: Update UI selectors and validate in Studio.

## Package mismatch

**Solution**: Upgrade to supported package versions and redeploy.

## Robot connection issues

**Solution**: Check Orchestrator configuration and credentials.

## Debugging failed scenarios

**Solution**: Use application logs, drill into `HTTP` error details, and analyze infrastructure usage charts to isolate root causes.

## Automation is detected as Desktop but runs in a browser

The dry run detects the application type of an automation as Desktop, for example because of Excel operations. As a result, each machine runs only one Virtual User, even though the automation runs in a browser.

**Solution**: Change the application type of the load group from Desktop to Browser. For steps, refer to [Step 4: Configure load group settings](step-4-configure-load-group-settings.md). The next dry run reports the application type that Test Manager detects, which can differ from the type you set.

## Performance test rules do not appear in Workflow Analyzer

The performance test rules do not appear in Studio when the project uses an earlier version of the Testing activities package.

**Solution**: Upgrade `UiPath.Testing.Activities` to version 26.10.0 or later, then run Workflow Analyzer again. For the list of rules, refer to [Performance test rules in Workflow Analyzer](performance-test-rules-in-workflow-analyzer.md).

## Automation doesn't receive Data Fabric values

**Solution**: Check the following:

* The argument name and type match the column name and type exactly.
* The argument direction is **In**.
* You published the latest version of the automation after adding the argument.
* The entity is linked to the load group that contains the test case.

## Performance Testing charts are empty or metrics are missing (port 5671 blocked)

If **Performance Testing charts are empty** or **metrics are missing**, it may be caused by a firewall blocking **Port 5671**, which is required for communication with **Azure Event Hub**. The UiPath Robot uses this port to send performance metrics to the **Performance Testing Service**.

If port 5671 is blocked, Performance Testing automatically falls back to WebSocket-based communication over port 443, and if that also fails, falls back further to API-based metric delivery. You typically don't need to request a new firewall rule — the fallback happens automatically — but the diagnostic below still helps confirm which path your metrics are actually using.

## Context
* **Communication protocol**
  + Protocol: **AMQP (Advanced Message Queuing Protocol)**
  + Transport: **TCP**
  + Port: **5671**
* **Encryption**
  + All communication is secured using **TLS 1.2 or higher**.
  + Encryption in transit is enforced by **Azure Event Hub**.
  + Data at rest is encrypted using **Microsoft-managed keys**. UiPath does not apply additional encryption at the application layer.
* **Authentication**
  + Authentication is handled using **Shared Access Signature (SAS) tokens**.
  + Tokens are issued and validated by **Azure Event Hub**.
  + Only authenticated clients can publish messages.
* **Endpoint details**
  + Endpoint format: `*.http://servicebus.windows.net|servicebus.windows.net`.
  + Service: **Azure Event Hub (Microsoft Azure managed service)**.
* **Architecture overview**
  1. The Robot sends performance metrics using AMQP over TLS.
  2. Data is transmitted to **Azure Event Hub**.
  3. The **Performance Testing service** consumes the events.
  4. Metrics are processed and displayed in dashboards.

## Solution
1. Run the following command on the **Robot machine** using **Windows PowerShell**.
   ```
   Test-NetConnection -ComputerName tmh-prod-tmh-eus-ehn.servicebus.windows.net -Port 5671
   ```
2. Interpret the results.
   * Port is open (Expected). This means the Robot can successfully communicate with Azure Event Hub.
     ```
     TcpTestSucceeded : True
     ```
   * Port is blocked. This indicates that the firewall is blocking outbound communication on **Port 5671**.
     ```
     WARNING: TCP connect to (x.x.x.x : 5671) failed
     ```
     ```
     TcpTestSucceeded : False
     ```

3. If the port is blocked, allow the following outbound connection (firewall rule):
   * Protocol: TCP
   * Port: 5671
   * Destination: `*.http://servicebus.windows.net|servicebus.windows.net`

## Additional information
* If metrics still aren't showing up after confirming port 5671 is blocked, the automatic fallback didn't succeed either — usually because port 443 or the Performance Testing API endpoint is also blocked outbound for this environment. Check outbound access on port 443 and the Performance Testing API endpoint next.
* If connectivity is successful but metrics are still missing, further investigation of Robot logs is required.
