Skip to main content
No Result Found

Tests running slow due to incorrect hub/repeater selection

Learn how to avoid poor performance due to sub-optimal connections while connecting with BrowserStack.

Issue

When you run a test using BrowserStack Automate, the following error appears on the Issues Detected tab in the Automate dashboard.

Sub-optimal test route leading to poor performance

Cause

In every test script that you want to run on BrowserStack, the hub URL is specified. BrowserStack automatically assigns the hub/repeater closest to your machine location geographically. This auto selection ensures that latency issues are not encountered.

You might see this error in following situations:

  • Instead of the using the default hub URL, the URL is manually set in the test script.
  • Local machine using a custom hub URL stored in the cache.
  • DNS configurations enforced by your organization that lead to incorrect hub URL to be selected.

Why you must mitigate this issue

As an organization, optimizing your builds to run faster, is crucial. BrowserStack understands the need to identify issues that might not be evident, but have a large impact on the speed and stability of your test sessions.

Use the resolutions provided to mitigate these issues so as to:

  • Improve performance
  • Reduce test flakiness

Resolution/Workaround

Check proxy configurations

If you are running your tests routed through a proxy, BrowserStack resolves the hub IP to the nearest location of your proxy. For example, though the test are run from a machine in one region, such as asia pacific, and if your proxy is in another region, such as US, the test runs appear to be initiated from the proxy location. This leads to the hub IP being resolved to the nearest IP in the US region causing latency issues.

Proxy configuration resulting in poor performance

Run the following command in your command-line to check the region-specific hub URL used to connect to BrowserStack.

   nslookup hub.browserstack.com

Verify that the canonical name in the response is specific to the region from where the tests are executed. The hub-cloud.browserstack.com URL auto resolves to one of the following hubs, displayed as canonical name in the response:

  • hub-use.browserstack.com
  • hub-usw.browserstack.com
  • hub-euw.browserstack.com
  • hub-aps.browserstack.com
  • hub-apse.browserstack.com

If you are running the tests in the asia pacific region, then the canonical name displayed must be either hub-aps.browserstack.com or hub-apse.browserstack.com. Ensure that the proxy configurations are changed such that tests are run on the appropriate hub.

Other resolutions

You can also try the following options to resolve this issue:

  • Always use the hub.browserstack.com URL in your test script. Refrain from using region-specific URLs unless BrowserStack support recommends it.
  • Configure your DNS settings to refresh the cache at specific intervals
  • Ensure that your DNS configurations resolve to the correct hub IP.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle