{"id":20113795,"url":"https://github.com/bitbar/testdroid-api-client-ruby","last_synced_at":"2025-05-06T12:30:44.587Z","repository":{"id":13626391,"uuid":"16319666","full_name":"bitbar/testdroid-api-client-ruby","owner":"bitbar","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-21T13:08:14.000Z","size":69238,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T12:21:55.351Z","etag":null,"topics":["bitbar"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-01-28T17:34:00.000Z","updated_at":"2024-07-10T09:08:48.000Z","dependencies_parsed_at":"2023-11-21T14:39:06.583Z","dependency_job_id":null,"html_url":"https://github.com/bitbar/testdroid-api-client-ruby","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitbar%2Ftestdroid-api-client-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitbar%2Ftestdroid-api-client-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitbar%2Ftestdroid-api-client-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitbar%2Ftestdroid-api-client-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitbar","download_url":"https://codeload.github.com/bitbar/testdroid-api-client-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252683388,"owners_count":21788029,"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":["bitbar"],"created_at":"2024-11-13T18:25:59.648Z","updated_at":"2025-05-06T12:30:39.575Z","avatar_url":"https://github.com/bitbar.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/testdroid-api-client.svg)](https://badge.fury.io/rb/testdroid-api-client)\n\n\nTestdroid API Client for Ruby\n=============================\n\n## Installation\n\n```ruby\n# Gemfile\ngem \"testdroid-api-client\"\n```\n\n```bash\n\u003e bundle install\n```\n\n## Sample client usage - Authenticate\n```ruby\nrequire 'testdroid-api-client'\n\nclient = TestdroidAPI::Client.new('admin@localhost', 'admin')\n```\n\n## Sample usage - get projects\n```ruby\n @user = client.authorize\n projects = @user.projects.list\n```\n\n## Get project by id\n```ruby\nproject_id = 123\nproject123 = @user.projects.get(project_id)\n#output project name\np \"Project name #{project123.name}\"\n```\n\n## Get project by name\n```ruby\nproject = @user.projects.list({:filter =\u003e \"s_name_eq_MyProject\"})[0]\n```\n\n## Get available frameworks\n```ruby\nframeworks = @user.available_frameworks.list\n```\n\n## Find specific framework\n```ruby\nframework = @user.available_frameworks.list({:filter =\u003e \"s_osType_eq_ANDROID;s_name_like_%Instrumentation\"})[0]\n```\n\n## Upload files\n```ruby\nfile_app = @user.files.upload(File.join(File.dirname(__FILE__), \"BitbarSampleApp.apk\"))\nfile_test = @user.files.upload(File.join(File.dirname(__FILE__), \"BitbarSampleAppTest.apk\"))\n```\n\n## Start test run\n```ruby\ntest_run = @user.runs.create(\"{\\\"osType\\\": \\\"ANDROID\\\", \\\"projectId\\\": #{project.id}, \\\"frameworkId\\\":#{framework_id},\n  \\\"deviceIds\\\": #{id_list}, \\\"files\\\": [{\\\"id\\\": #{file_app.id}, \\\"action\\\": \\\"INSTALL\\\" },\n  {\\\"id\\\": #{file_test.id}, \\\"action\\\": \\\"RUN_TEST\\\" }]}\")\n\n#See full list of params: https://docs.bitbar.com/testing/api/tests/index.html#details-about-the-configuration-fields\n```\n\n## Download all files from test run\n```ruby\ntest_run.device_sessions.list({:limit =\u003e 0}).each { |ds| ds.download_all_files(\"YOUR_PATH\") }\n```\n\n## Get all input files\n```ruby\nfiles = @user.files\nfiles.list({:limit =\u003e 40,:filter =\u003e \"s_direction_eq_INPUT\"}).each { \n    |f| puts \"File id: #{f.id} name: #{f.name}\" }\n```\n\nSee https://cloud.bitbar.com/cloud/swagger-ui.html for more details about API V2, make sure you are logged in.\n\nLocal development\n=================\n\n1. Install ruby\n2. `bundle install`\n3. Run tests: `rspec`, remove `spec/fixtures/cassettes` if you want to execute real Http requests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitbar%2Ftestdroid-api-client-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitbar%2Ftestdroid-api-client-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitbar%2Ftestdroid-api-client-ruby/lists"}