1

I am doing mobile testing and thinking to migrate my tests to the Sauce Labs platform.

I have to do automated testing and the platform needs to run Appium with robot tests.

Can I run tests written in Robot Framework (with Appium) in Sauce Labs platform?

Exploring
  • 2,493
  • 11
  • 56
  • 97

1 Answers1

0

Because Sauce Labs works with Selenium and Appium's remote protocols, it should be possible to integrate it with almost every tool which supports those.

That includes Appium/Robot; in fact, one of the Sauce Labs solutions Engineers has a example online for native apps for both iOS and Android: https://github.com/saucelabs-training/demo-python/tree/main/examples/robotframework/native_mobile

The basic idea is that it uses the relevant Sauce Labs Appium data centre as the remote server URL and passes valid desired capabilities using variables:

Start Session
    Open application  ${REMOTE_URL}
    ...  platformName=${PLATFORM_NAME}
    ...  platformVersion=${PLATFORM_VERSION}
    ...  deviceOrientation=${DEVICE_ORIENTATION}
    ...  username=%{SAUCE_USERNAME}
    ...  accessKey=%{SAUCE_ACCESS_KEY}
    ...  privateDevicesOnly=${PRIVATE_DEVICES_ONLY}
    ...  app=https://github.com/saucelabs/sample-app-mobile/releases/download/2.7.1/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk
    ...  name=${TEST_NAME}  

It can even update the Sauce Labs test status, using the JavaScript executor:

End Session
    Run Keyword If  '${TEST_STATUS}'== 'PASS'  Execute Script  sauce:job-result=passed
    ...  ELSE  Execute Script  sauce:job-result=failed
    Close all applications
Dylan Lacey
  • 1,839
  • 12
  • 23