Mobile Device farm

How many real devices/simulators can be connected to the host machine while creating our own device farm using test project

Hi @anju77lakshetti ,

First of all welcome to our community :slight_smile:
You can connect as many as you want and the agent will detect them.
However, it depends on the test you are trying to do if you are executing a serial test it will be no problem.
But if you are executing a parallel test this is a different scenario because this depends on your machine resources.
Running tests and jobs in parallel requires additional resources and capabilities from the machine they are running on. It is not reasonable to spawn hundreds of browsers simultaneously, therefore please make sure that this setting contains a reasonable value.

Too many workers can harm automation due to CPU and Memory starvation. Typically this value should not exceed 50% of the available CPU cores (including hyper-threads if available) and 2GB of RAM per Agent worker.

For example, if the host has 8 logical processors (cores), it is recommended to not exceed 4 Agent workers.

The easiest way to set the maximum allowed workers amount is via the TestProject Application:

  • Navigate to the Agents screen

  • Expand the line of the Agent you want to configure

  • Set the desired value into the Max Workers field

You can find more information about agent workers configuration here:

Also if you are interested we have built-in integration with Sauce Labs and BrowserStack:

Let me know if it helped you and if you have any other questions please feel free to ask :slight_smile:

1 Like

Thank you @alex.ivanov.
Just another question on same lines, can we trigger tests from different machines on the different mobile devices that are connected to host machine at a same time?

@alex.ivanov Also I would like to know if I want to execute 1 test on each device that is connected device farm at a same time. How many such devices can be invoked?

Hi @anju77lakshetti ,

  1. Actually, there is a way to achieve that, but it is not precisely the same time.
    You can do it with an API call that will trigger test after test, the difference is between this way and a specific same time execution is that with API, it will take a couple of seconds to achieve, so if it helps, you can try to do it with an API call.

  2. The max workers that you can give to your agent is 10 (10 devices), which means that if you, for example, running a job with 40 tests, ten tests will execute on 10 devices, and after it is accomplished, it will run another 10 tests with other devices and so on.

Let me know if it helped you, and if you have further questions, feel free to ask :slight_smile:

1 Like

Thank you @alex.ivanov for quick response. That helps.
Just would like to know more about API call. Can you share the link of any documentation related to API call execution?

Hi @anju77lakshetti ,

We have this guide on how to use the RESTful API addon:

Here is some more info and a couple of videos:
Here is what’s in the addon itself:

And here’s our own TestProject API in case that interests you:
And here’s a video on how to use API correctly:

For your specific scenario, you can use the information from the video above and implement them in a particular step in a specific test that will call other tests/jobs.

1 Like

Why can’t regular (non-admin) users remote into devices on the device farm? The only way I can see doing it is to have everyone setup as an Admin.

This topic was automatically closed after 180 days. New replies are no longer allowed.