TestProject Forum
Powered by leading experts in the test automation community

Can you run a web test against multiple browsers+devices in a single job?

I have recorded a rudimentary web test of Test Project’s example web app - https://example.testproject.io/web/ - using Chrome on Windows.

I have a Google Pixel 3a tethered to the Windows machine by USB, which is detected by the Test Project Agent.

When I run the test manually from the “Tests” panel, the Chrome browser on the Android device is offered as one of the options, and when I choose this option, the test runs successfully in this browser.

When I add the test to an Android Job, it also runs successfully in Chrome on the Android device.

However, if I add the test to a Web Test Job, the job only shows options for the browsers on the Windows machine itself.

Is there a way to run the same web test on multiple devices in a single job? Or is it always necessary to create a series of jobs (one per device) that reuse the same test?

Hi @alanco,

You can create an iOS or Android job and assign your web tests to them. On Android, the web test will run on the device’s Chrome browser and on iOS, it will run on Safari.

When you define that job, you can select multiple devices as your target devices. The tests inside that job, will run on each of the selected devices. It will run all the tests in sequence on device A, then on device B and so on.

This logic applies to all jobs type: web, Android and iOS.

Let me know if you will need my help with that :wink:

Kind regards,
Amit

Thanks for the quick reply Amit.

My web test job only detects the browsers on my host machine (Windows 10).

My Android job only detects the browser on my Android phone.

So just to confirm - this is Test Project’s expected behaviour? The only way to schedule the execution of the website test across two devices is to create two jobs - one job per device type - correct?

Hi @alanco,

You are right.
A mobile job capable of running web tests on the device’s browser (Chrome or Safari)and a web test, can only run tests on the host machine’s browsers. So in your case, you’ll have to create jobs- web and mobile.

By the way, we’ve just released new integration with Sauce Labs that allows you ro run your tests/jobs on more than 1000 devices and browsers :slight_smile:
You can read more about it here: https://docs.testproject.io/testproject-integrations/sauce-labs-integration

You’re welcome to go ahead and sign up to a joint webinar we are having to demonstrate this exciting integration with Sauce Labs: https://info.saucelabs.com/test-creation-management-and-execution-webinar-T.html
I Hope to see you there :wink: