我可以在酱汁实验室中使用Appium进行机器人测试吗?

发布于 2025-02-02 10:53:33 字数 129 浏览 4 评论 0原文

我正在进行移动测试,并考虑将测试迁移到Sauce Labs平台。

我必须进行自动测试,并且平台需要使用机器人测试运行Appium。

我可以在Sauce Labs平台中运行用机器人框架(使用Appium)编写的测试吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光倒影 2025-02-09 10:53:33

由于Sauce Labs可以与Selenium和Appium的远程协议一起使用,因此应该将其与几乎所有支持这些工具的工具集成在一起。

其中包括Appium/机器人;实际上,iOS和Android的本机应用程序在线上有一个Sauce Labs Solutions工程师:

https://github.com/saucelabs-training/demo-python/dree/tree/main/main/main/examples/robotframework/native_mobile Labs Appium Data Center作为远程服务器URL,并使用变量传递有效的所需功能:

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}  

它甚至可以使用JavaScript执行程序更新Sauce Labs测试状态:

End Session
    Run Keyword If  '${TEST_STATUS}'== 'PASS'  Execute Script  sauce:job-result=passed
    ...  ELSE  Execute Script  sauce:job-result=failed
    Close all applications

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文