Executing coded test on device farms other than BrowserStack and SauceLabs

Based on my understanding on using OpenSDK to create a coded test, we can specify a custom capability of TestProjectCapabilityType.CLOUD_URL to specify a cloud provider like BrowserStack to execute our coded test. For example, for connecting to BrowserStack, we can write in Java as:

capabilities.setCapability(TestProjectCapabilityType.CLOUD_URL, “https://hub-cloud.browserstack.com/wd/hub”);

May I know does TestProject OpenSDK currently support connecting to cloud providers other than BrowserStack and SauceLabs?

Hi @pohsoon.lee ,

To execute tests on BrowserStack using code, you will need to set some different capabilities:

You need to upload the app you want to test on to BrowserStack, you will get an appURL that you need to put under the “app” Capability.

Then you will have to set CloutURL Capability depending on your username and password, for example:

Hi @alex.ivanov,
Actually my question was not about executing tests on BrowserStack or SauceLabs. Instead, it is about whether we can execute tests on other cloud providers like pCloudy and Perfecto.
In other words, can I put something in my Java OpenSDK code like:

capabilities.setCapability(TestProjectCapabilityType.CLOUD_URL, "https://device.pcloudy.com/appiumcloud/wd/hub");

Is it something currently allowed in TestProject coded test?

No, we do not support other cloud providers, you can only integrate with BS and SL.

@pohsoon.lee while they do not support other cloud providers, you can certainly run your tests against other providers. I’ve set up my tests to run against CrossBrowserTesting successfully via a docker container.

@nextechgarch Good to know that. Could you share with me the details on how to do that?
I have tried setting the CLOUD_URL capability to point to other cloud provider like pCloudy but the TestProject agent seems not recognizing the provider URL and therefore throw connection error.

this is my docker compose that I use. Very simple and straightforward :slight_smile: You can even add different browsers if you like.

version: "3.8"
    image: testproject/agent:latest
    container_name: testproject-agent
      TP_JOB_ID: ${TP_JOB_ID}
      CHROME: "${HUB_EMAIL}:${HUB_API_KEY}@hub.crossbrowsertesting.com:80"

This just does basic auth to authenticate, pulls the job from TestProject and tests against the hub. As it’s a docker container, you can spin them up however you like.

1 Like

Hi @pohsoon.lee. Did you figure this out for mobile? If so, may I ask how you did it?

It is still not working for mobile testing cloud providers. After some actual testing with different provider URLs as well as clarification with TestProject Support, I understand that only BrowserStack and SauceLabs are supported now by TestProject agent internally.

1 Like

Thanks @pohsoon.lee. Much appreciated.

is there any way I can do in JS and run my mobile app test on BS?

I need what kind of capabilities I need to set please

driver = await new MobileBuilder(AndroidDriver)
new Capabilities({
udid: ‘emulator-5554’,
app: ‘https://github.com/testproject-io/android-demo-app/raw/master/APK/testproject-demo-app.apk’,