TestProject Forum
Powered by leading experts in the test automation community

Trigger mobile app tests on BrowserStack from API

I can trigger mobile app tests on my own devices / agent via the API using the following endpoint:

/v2/projects/{projectId}/tests/{testId}/run

However I’m unable to trigger tests on browserstack due to the required “device” (UDID) field.

Is it possible to trigger tests on browserstack from the API (from my CI / CD pipeline) ?

Thanks,
Denis

Hello @denis.babineau, thanks for reaching out.

You can assign this mobile test to a job, and configure it in advance to run using BrowserStack and set the mobile device you want the test to be running on:

  1. create a job:
    image

  2. named it as you want, click next, and select “BrowserStack” option, select the desired device:
    image

  3. drag and drop the required test into the job

then, you can trigger the job using this endpoint:
/v2/projects/{projectId}/jobs/{jobId}/run

Thanks @meidan.nasi for the quick response, that works! This makes total sense for my use case!