{"id":51402950,"url":"https://github.com/testingbot/testingbot-gradle-plugin","last_synced_at":"2026-07-04T08:32:53.452Z","repository":{"id":368581882,"uuid":"1285777260","full_name":"testingbot/testingbot-gradle-plugin","owner":"testingbot","description":"Gradle plugin for TestingBot","archived":false,"fork":false,"pushed_at":"2026-07-01T08:50:12.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-01T09:21:16.277Z","etag":null,"topics":["gradle","kotlin-android","testingbot"],"latest_commit_sha":null,"homepage":"https://testingbot.com/support/app-automate/espresso","language":"Kotlin","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/testingbot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-01T06:16:42.000Z","updated_at":"2026-07-01T08:50:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/testingbot/testingbot-gradle-plugin","commit_stats":null,"previous_names":["testingbot/testingbot-gradle-plugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/testingbot/testingbot-gradle-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Ftestingbot-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Ftestingbot-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Ftestingbot-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Ftestingbot-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testingbot","download_url":"https://codeload.github.com/testingbot/testingbot-gradle-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingbot%2Ftestingbot-gradle-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35115741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gradle","kotlin-android","testingbot"],"created_at":"2026-07-04T08:32:52.607Z","updated_at":"2026-07-04T08:32:53.440Z","avatar_url":"https://github.com/testingbot.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestingBot Gradle Plugin\n\n[![Build](https://github.com/testingbot/testingbot-gradle-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/testingbot/testingbot-gradle-plugin/actions/workflows/build.yml)\n[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/com.testingbot.gradle)](https://plugins.gradle.org/plugin/com.testingbot.gradle)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA [Gradle](https://gradle.org/) plugin that uploads Android apps to\n[TestingBot](https://testingbot.com) Storage and runs **Espresso** tests on TestingBot's\nreal device cloud — straight from your build, no `curl` scripts required.\n\n## Features\n\n- **`testingbotUpload`** — upload an APK to TestingBot Storage and get a reusable\n  `tb://\u003cappkey\u003e` identifier.\n- **`testingbotEspresso`** — upload your app + instrumented test APK, run Espresso across\n  one or more devices, wait for results, download a JUnit XML report, and fail the build on\n  test failures.\n- **`testingbotDevices`** — list the Android devices available on your account.\n- Credentials from the DSL, Gradle properties, or environment variables.\n- Optional Android Gradle Plugin auto-wiring (build + test in one command).\n- Zero extra HTTP dependencies on your build classpath; configuration-cache compatible.\n\n## Requirements\n\n- Gradle 8.0+ running on JDK 17 or newer.\n- A TestingBot account. Grab your **key** and **secret** at\n  \u003chttps://testingbot.com/members/user/api\u003e.\n\n## Installation\n\n```kotlin\n// build.gradle.kts (your Android app module)\nplugins {\n    id(\"com.testingbot.gradle\") version \"0.1.0\"\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy DSL\u003c/summary\u003e\n\n```groovy\n// build.gradle\nplugins {\n    id 'com.testingbot.gradle' version '0.1.0'\n}\n```\n\u003c/details\u003e\n\n## Credentials\n\nResolved in this order (first match wins):\n\n1. The DSL — `testingbot { key.set(\"…\"); secret.set(\"…\") }`\n2. Gradle properties — `-Ptestingbot.key=… -Ptestingbot.secret=…` (or in `gradle.properties`)\n3. Environment variables — `TESTINGBOT_KEY` / `TESTINGBOT_SECRET`\n\nIn CI, prefer environment variables backed by secrets. **Never commit credentials.**\n\n## Usage\n\n```kotlin\ntestingbot {\n    // Credentials (optional here if provided via env vars / gradle properties)\n    key.set(providers.environmentVariable(\"TESTINGBOT_KEY\"))\n    secret.set(providers.environmentVariable(\"TESTINGBOT_SECRET\"))\n\n    // The app + instrumented test APKs\n    appApk.set(layout.projectDirectory.file(\"app/build/outputs/apk/debug/app-debug.apk\"))\n    testApk.set(\n        layout.projectDirectory.file(\"app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk\")\n    )\n\n    // One run is started per capability. Keys are passed through to TestingBot verbatim.\n    capabilities.set(\n        listOf(\n            mapOf(\"deviceName\" to \"Pixel.*\", \"version\" to \"14\", \"platformName\" to \"Android\", \"realDevice\" to true),\n            mapOf(\"deviceName\" to \"Galaxy S.*\", \"version\" to \"13\", \"platformName\" to \"Android\"),\n        )\n    )\n\n    // Optional behavior\n    waitForResults.set(true)            // poll until the run completes (default true)\n    failBuildOnTestFailure.set(true)    // default true\n    reportXml.set(layout.buildDirectory.file(\"testingbot/espresso-junit.xml\"))\n}\n```\n\nThen:\n\n```bash\n# Upload only\n./gradlew testingbotUpload\n\n# Build the APKs first, then run Espresso on TestingBot\n./gradlew assembleDebug assembleDebugAndroidTest testingbotEspresso\n\n# Discover device names/versions for your capabilities\n./gradlew testingbotDevices\n```\n\n### Device capabilities\n\n`deviceName` accepts a regular expression, so `\"Pixel.*\"` matches any Pixel and `\"*\"` any\ndevice. Commonly used keys: `deviceName`, `version`, `platformName` (`\"Android\"`),\n`realDevice`, `phoneOnly`, `tabletOnly`. Run `./gradlew testingbotDevices` to see what's\navailable on your plan.\n\n### Optional: Android Gradle Plugin auto-wiring\n\nIf the `com.android.application` plugin is applied, naming a variant lets the plugin fill in\nthe conventional APK paths and depend on the matching `assemble` tasks automatically:\n\n```kotlin\ntestingbot {\n    autoWireFromVariant.set(\"debug\")   // defaults appApk/testApk + dependsOn assembleDebug(AndroidTest)\n    capabilities.set(listOf(mapOf(\"deviceName\" to \"Pixel.*\", \"version\" to \"14\", \"platformName\" to \"Android\")))\n}\n```\n\nNow `./gradlew testingbotEspresso` builds the APKs and runs the tests in one go. Explicitly\nset `appApk`/`testApk` paths always take precedence.\n\n## Full DSL reference\n\n| Property | Type | Default | Description |\n|---|---|---|---|\n| `key` | `String` | `TESTINGBOT_KEY` / `testingbot.key` | API key |\n| `secret` | `String` | `TESTINGBOT_SECRET` / `testingbot.secret` | API secret |\n| `apiBaseUrl` | `String` | `https://api.testingbot.com/v1` | API base URL |\n| `appApk` | `RegularFile` | — | App APK to upload / test |\n| `testApk` | `RegularFile` | — | Instrumented Espresso test APK |\n| `capabilities` | `List\u003cMap\u003cString, Any\u003e\u003e` | `[]` | One run per entry; passed through verbatim |\n| `espressoOptions` | `Map\u003cString, Any\u003e` | `{}` | Optional run options passed through verbatim |\n| `waitForResults` | `Boolean` | `true` | Poll until the run completes |\n| `pollIntervalSeconds` | `Long` | `15` | Seconds between status polls |\n| `timeoutMinutes` | `Long` | `30` | Max minutes to wait for results |\n| `failBuildOnTestFailure` | `Boolean` | `true` | Fail the build when a run reports failures |\n| `reportXml` | `RegularFile` | `build/testingbot/espresso-junit.xml` | Where to write the JUnit report |\n| `autoWireFromVariant` | `String` | — | Optional AGP variant to auto-wire |\n\n## CI example (GitHub Actions)\n\n```yaml\n- uses: actions/setup-java@v4\n  with: { distribution: temurin, java-version: 21 }\n- run: ./gradlew assembleDebug assembleDebugAndroidTest testingbotEspresso\n  env:\n    TESTINGBOT_KEY: ${{ secrets.TESTINGBOT_KEY }}\n    TESTINGBOT_SECRET: ${{ secrets.TESTINGBOT_SECRET }}\n```\n\nThe JUnit report written to `reportXml` can be published with your CI's test-report tooling.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). Security issues: see [SECURITY.md](SECURITY.md).\n\n## License\n\n[MIT](LICENSE) © TestingBot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Ftestingbot-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestingbot%2Ftestingbot-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingbot%2Ftestingbot-gradle-plugin/lists"}