Improve test performance by routing traffic locally

Perfecto’s region-aware routing with hub.perfectomobile.com allows test traffic to be handled by a service closer to the tester’s location, improving performance when the tester and device are in the same region but the cloud is remote.

Use this feature when:

  • You are geographically distant from your Perfecto cloud region

  • Your device under test is in your local region

This setup minimizes network latency and speeds up test execution.

Restrictions

The following restrictions apply to region-aware routing:

  • Not supported for virtual devices.

  • Cannot be used with the deviceSessionId capability.

Setup steps

To enable region-aware routing in your test configuration, do the following.

  • Set the remote WebDriver URL to https://<your-cloud>.hub.perfectomobile.com/nexperience/perfectomobile/wd/hub, where <your-cloud> is the name of your Perfecto cloud, for example, demo.

The following code snippet is adapted from the  PerfectoAppium.java sample to demonstrate region-aware routing.

Copy
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("perfecto:securityToken", securityToken);
// Other capabilities...

driver = new AndroidDriver(
    new URL("https://<your-cloud>.hub.perfectomobile.com/nexperience/perfectomobile/wd/hub"),
    capabilities
);