{"id":22363106,"url":"https://github.com/lambdatest/lt-appium-ruby","last_synced_at":"2025-07-07T19:05:58.725Z","repository":{"id":37090353,"uuid":"446346664","full_name":"LambdaTest/LT-appium-ruby","owner":"LambdaTest","description":"Run Ruby and Appium scripts on LambdaTest automation cloud. A sample repo to help you run Ruby based test scripts in parallel with LambdaTest","archived":false,"fork":false,"pushed_at":"2023-01-25T10:55:01.000Z","size":43,"stargazers_count":7,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-03-07T15:10:00.871Z","etag":null,"topics":["android-automation","app-automation","appium","appium-ruby","ios-automation","lambdatest","mobile-app-testing","ruby","testing-tools"],"latest_commit_sha":null,"homepage":"https://www.lambdatest.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LambdaTest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-10T08:52:37.000Z","updated_at":"2023-01-29T08:41:49.000Z","dependencies_parsed_at":"2023-02-14T06:45:38.931Z","dependency_job_id":null,"html_url":"https://github.com/LambdaTest/LT-appium-ruby","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LambdaTest","download_url":"https://codeload.github.com/LambdaTest/LT-appium-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228154023,"owners_count":17877704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-automation","app-automation","appium","appium-ruby","ios-automation","lambdatest","mobile-app-testing","ruby","testing-tools"],"created_at":"2024-12-04T17:13:40.468Z","updated_at":"2025-07-07T19:05:58.704Z","avatar_url":"https://github.com/LambdaTest.png","language":"Ruby","readme":"# Ruby With Appium ![pw](https://img.shields.io/badge/Ruby-CC342D?style=for-the-badge\u0026logo=ruby\u0026logoColor=white)\n\n\u003cp align=\"center\"\u003e\n\u003cimg height=\"500\" src=\"https://user-images.githubusercontent.com/95698164/171857146-90e52e22-0070-4798-b2a5-6cc525a4da66.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.lambdatest.com/blog/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby\" target=\"_bank\"\u003eBlog\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/support/docs/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby\" target=\"_bank\"\u003eDocs\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/learning-hub/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby\" target=\"_bank\"\u003eLearning Hub\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/newsletter/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby\" target=\"_bank\"\u003eNewsletter\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/certifications/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby\" target=\"_bank\"\u003eCertifications\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.youtube.com/c/LambdaTest\" target=\"_bank\"\u003eYouTube\u003c/a\u003e\n\u003c/p\u003e\n\u0026emsp;\n\u0026emsp;\n\u0026emsp;\n\n*Appium is a tool for automating native, mobile web, and hybrid applications on iOS, Android, and Windows platforms. It supports iOS native apps written in Objective-C or Swift and Android native apps written in Java or Kotlin. It also supports mobile web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in 'Browser' app on Android). Perform Appium automation tests on [LambdaTest's online cloud](https://www.lambdatest.com/appium-mobile-testing).*\n\n*Learn the basics of [Appium testing on the LambdaTest platform](https://www.lambdatest.com/support/docs/getting-started-with-appium-testing/).*\n\n[\u003cimg height=\"53\" width=\"200\" src=\"https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png\"\u003e](https://accounts.lambdatest.com/register)\n\n## Table of Contents\n\n* [Pre-requisites](#pre-requisites)\n* [Run Your First Test](#run-your-first-test)\n* [Executing The Tests](#executing-the-tests)\n\n## Pre-requisites\n\nBefore you can start performing Ruby automation testing with Appium, you would need to:\n\n- Install **Ruby** on your local system. Follow these instructions to install on different operating systems.\n\n  - For **Windows**, you can download from the [official website](https://rubyinstaller.org/downloads/).\n  - For **Linux** or **Ubuntu**, you can run a simple apt command like below:\n\n    ```bash\n    sudo apt-get install ruby-full\n    ```\n\n  - For **macOS**, you can run a [Homebrew](https://brew.sh/) command like this:\n\n    ```bash\n    brew install ruby\n    ```\n\n\n### Clone The Sample Project\n\nClone the LambdaTest’s [LT_Ruby_Appium](https://github.com/LambdaTest/LT_Ruby_Appium) and navigate to the code directory as shown below:\n\n```bash\ngit clone https://github.com/LambdaTest/LT_Ruby_Appium\ncd LT_Ruby_Appium\n```\n\n### Setting Up Your Authentication\n\nMake sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest. To obtain your access credentials, [purchase a plan](https://billing.lambdatest.com/billing/plans) or access the [Automation Dashboard](https://appautomation.lambdatest.com/).\n\nSet LambdaTest `Username` and `Access Key` in environment variables.\n\n**For Linux/macOS:**\n\n```js\nexport LT_USERNAME=YOUR_LAMBDATEST_USERNAME \\\nexport LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n \n**For Windows:**\n \n```js\nset LT_USERNAME=YOUR_LAMBDATEST_USERNAME `\nset LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n  \n### Upload Your Application\n\nUpload your **_iOS_** application (.ipa file) or **_android_** application (.apk file) to the LambdaTest servers using our **REST API**. You need to provide your **Username** and **AccessKey** in the format `Username:AccessKey` in the **cURL** command for authentication. Make sure to add the path of the **appFile** in the cURL request. Here is an example cURL request to upload your app using our REST API:\n\n**Using App File:**\n\n**For Linux/macOS:**\n\n```js\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" \\\n--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \\\n--form 'name=\"Android_App\"' \\\n--form 'appFile=@\"/Users/macuser/Downloads/proverbial_android.apk\"' \n```\n\n**For Windows:**\n\n```js\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" -X POST \"https://manual-api.lambdatest.com/app/upload/realDevice\" -F \"appFile=@\"/Users/macuser/Downloads/proverbial_android.apk\"\"\n```\n\n**Using App URL:**\n\n**For Linux/macOS:**\n\n```js\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" \\\n--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \\\n--form 'name=\"Android_App\"' \\\n--form 'url=\"https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk\"'\n```\n\n**For Windows:**\n\n```js\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" -X POST \"https://manual-api.lambdatest.com/app/upload/realDevice\" -d \"{\"url\":\"https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk\",\"name\":\"sample.apk\"}\"\n```\n\n**Tip:**\n\n- If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample :link: [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample :link: [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).\n- Response of above cURL will be a **JSON** object containing the `App URL` of the format - \u003clt://APP123456789123456789\u003e and will be used in the next step.\n\n## Run Your First Test\n\nOnce you are done with the above-mentioned steps, you can initiate your first Ruby test on LambdaTest.\n\n**Test Scenario:** Check out [Android.rb](https://github.com/LambdaTest/LT-appium-ruby/blob/master/android/android-sample.rb) file to view the sample test script for android and [iOS.rb](https://github.com/LambdaTest/LT-appium-ruby/blob/master/ios/ios-sample.rb) for iOS.\n\n### Configuring Your Test Capabilities\n\nYou can update your custom capabilities in test scripts. In this sample project, we are passing platform name, platform version, device name and app url (generated earlier) along with other capabilities like build name and test name via capabilities object. The capabilities object in the sample code are defined as:\n\n**Info Note:**\n\n- In case you're using the Capabilities using the JSON Wire Protocol, then please use appium_lib version 10.6.0 and below.\n- Install it using ```gem install appium_lib -v 10.6.0``` command.\n\n\u003cTabs className=\"docs__val\"\u003e\n\n\u003cTabItem value=\"ios-config\" label=\"iOS\" default\u003e\n\n```ruby title=\"iOS(.ipa)\"\n caps = {\n            \"LT:Options\" =\u003e {\n                :deviceName =\u003e \"iPhone 13 Pro\",  \n                :platformName =\u003e \"iOS\",\n                :platformVersion =\u003e \"15\",\n                :build =\u003e \"Ruby Vanilla - iOS\",\n                :name =\u003e \"Ruby iOS Test\",\n                :isRealMobile =\u003e true,\n                :app =\u003e \"YOUR_APP_URL\", #Enter the App (.ipa) URL here\n                :w3c =\u003e true,\n        } }\n```\n\n\u003c/TabItem\u003e\n\u003cTabItem value=\"android-config\" label=\"Android\" default\u003e\n\n```ruby title=\"Android(.apk)\"\ncaps = {\n            \"LT:Options\" =\u003e {\n            :deviceName =\u003e \"OnePlus 7\",  \n            :platformName =\u003e \"Android\",\n            :platformVersion =\u003e \"9\",\n            :build =\u003e \"Ruby Vanilla - Android\",\n            :name =\u003e \"Ruby Android Test\",\n            :isRealMobile =\u003e true,\n            :app =\u003e \"YOUR_APP_URL\", #Enter the App (.apk) URL here\n            :w3c =\u003e true,\n        } }\n```\n\n\u003c/TabItem\u003e\n\n\u003c/Tabs\u003e\n\n**Info Note:**\n\n- You must add the generated **APP_URL** to the `\"app\"` capability in the config file.\n- You can generate capabilities for your test requirements with the help of our inbuilt **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/)**. A more Detailed Capability Guide is available [here](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/).\n\n## Executing The Tests\n\n\u003cTabs className=\"docs__val\"\u003e\n\n\u003cTabItem value=\"ios\" label=\"iOS\" default\u003e\n\nIf you are using an **iOS** app, the cURL command will generate an app URL for the corresponding iOS app and install the same for running the tests. You can either use our sample :link: [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa) or upload your own app as discussed earlier.\n\nNavigate to the corresponding directory based on your app.\n\n```bash\ncd ios\n```\n\nExecute the following command to run your test on LambdaTest platform:\n\n```bash\nruby ios-sample.rb\n```\n\n\u003c/TabItem\u003e\n\n\u003cTabItem value=\"android\" label=\"Android\" default\u003e\n\nIf you are using an **android** app, the cURL command will generate an app URL for the corresponding Android app and install the same for running the tests. You can either use our sample :link: [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or upload your own app as discussed earlier.\n\nNavigate to the corresponding directory based on your app.\n\n```bash\ncd android\n```\n\nExecute the following command to run your test on LambdaTest platform:\n\n```bash\nruby android-sample.rb\n```\n\n\u003c/TabItem\u003e\n\n\u003c/Tabs\u003e\n\n**Info Note**\nIn case of Windows, if you get any error message. Please try this method:\n\n1. Navigate to the corresponding directory based on your app.\n\n```bash\ncd android\n```\n2. Refresh the gem bundles through given command\n\n```bash\ngem uninstall -aIx\n```\n3. Re-install the gems required\n\n```bash\ngem install appium_lib -v 10.6.0\ngem install ffi\n```\n4. Now try running the corresponding automation script for your app.\n\n```bash\nruby android-sample.rb\n```\n\n**Info:** Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the :link: [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build).\n\n### Troubleshooting\n\nIf you encounter an issue where the gem installation fails with an error like `No such file or directory @ rb_sysopen`, you can resolve it by creating the required directory, setting up a custom gem path, or installing with administrator privileges.\n\n#### Option 1: Create the Missing Directory\n\n**macOS/Linux:**  \nRun the following command to create the required directory structure:\n```bash\nmkdir -p ~/.local/share/gem/ruby/\u003cruby_version\u003e/cache\n```\n**Windows:**\n```bash\nmkdir -p %USERPROFILE%\\.gem\\ruby\\\u003cruby version\u003e\\cache\n```\n#### Option 2: Set a Custom GEM Path\n**macOS/Linux:**\n```bash\nexport GEM_HOME=$HOME/gems\nexport PATH=$HOME/gems/bin:$PATH\ngem install appium_lib -v 10.6.0\n```\n**Windows:**\n```bash\nset GEM_HOME=%USERPROFILE%\\gems\nset PATH=%USERPROFILE%\\gems\\bin;%PATH%\ngem install appium_lib -v 10.6.0\n```\n#### Option 3: Install with Administrator Privileges\n**macOS/Linux:**\n```bash\nsudo gem install appium_lib -v 10.6.0\n```\n**Windows:**\nRun Command Prompt as Administrator, then:\n```bash\ngem install appium_lib -v 10.6.0\n``` \n\n## Additional Links\n\n- [Advanced Configuration for Capabilities](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/)\n- [How to test locally hosted apps](https://www.lambdatest.com/support/docs/testing-locally-hosted-pages/)\n- [How to integrate LambdaTest with CI/CD](https://www.lambdatest.com/support/docs/integrations-with-ci-cd-tools/)\n\n## Documentation \u0026 Resources :books:\n      \nVisit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.\n\n* [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby)\n* [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby)\n* [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby)    \n\n## LambdaTest Community :busts_in_silhouette:\n\nThe [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎\n\n## What's New At LambdaTest ❓\n\nTo stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/) \n      \n## About LambdaTest\n\n[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.    \n\n### Features\n\n* Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.\n* Real-time cross browser testing on 3000+ environments.\n* Test on Real device cloud\n* Blazing fast test automation with HyperExecute\n* Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.\n* Smart Visual Regression Testing on cloud\n* 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.\n* Automated Screenshot testing across multiple browsers in a single click.\n* Local testing of web and mobile apps.\n* Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.\n* Geolocation testing of web and mobile apps across 53+ countries.\n* LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports\n    \n[\u003cimg height=\"53\" width=\"200\" src=\"https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png\"\u003e](https://accounts.lambdatest.com/register)\n\n      \n## We are here to help you :headphones:\n\n* Got a query? we are available 24x7 to help. [Contact Us](support@lambdatest.com)\n* For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-ruby)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdatest%2Flt-appium-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-ruby/lists"}