{"id":44957580,"url":"https://github.com/aivanovski/pico-automator","last_synced_at":"2026-02-18T12:08:15.144Z","repository":{"id":195485194,"uuid":"691067002","full_name":"aivanovski/pico-automator","owner":"aivanovski","description":"Minimalistic UI testing framework for Android based on ADB calls","archived":false,"fork":false,"pushed_at":"2025-06-10T17:23:37.000Z","size":6459,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T17:54:57.983Z","etag":null,"topics":["android","clojure","kotlin","ui-automation","ui-testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aivanovski.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-13T12:42:19.000Z","updated_at":"2025-06-10T17:20:53.000Z","dependencies_parsed_at":"2023-09-18T07:52:11.971Z","dependency_job_id":"41d49145-fd05-4136-ba64-0c65700b68e1","html_url":"https://github.com/aivanovski/pico-automator","commit_stats":null,"previous_names":["aivanovski/pico-automator"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/aivanovski/pico-automator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivanovski%2Fpico-automator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivanovski%2Fpico-automator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivanovski%2Fpico-automator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivanovski%2Fpico-automator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aivanovski","download_url":"https://codeload.github.com/aivanovski/pico-automator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aivanovski%2Fpico-automator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29578238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","clojure","kotlin","ui-automation","ui-testing"],"created_at":"2026-02-18T12:08:15.055Z","updated_at":"2026-02-18T12:08:15.139Z","avatar_url":"https://github.com/aivanovski.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/aivanovski/pico-automator.svg)](https://jitpack.io/#aivanovski/pico-automator)\n\n## pico-automator\nSmall UI automation library for Android built on top of [ADB](https://developer.android.com/tools/adb) calls. It provides API to write readable and dynamic tests on Clojure that could be run inside REPL or from command line.\n\n## Demo\n![demo](https://github.com/aivanovski/pico-automator/blob/main/images/demo.gif)\n\n## Motivation\n*pico-automator* is inspired by [maestro](https://github.com/mobile-dev-inc/maestro) and allows to write UI tests on Clojure. The choice of Clojure allows to use a lightweight IDE (VS Code, Emacs, Vim and etc.) and REPL when writing tests.\n\n## Quickstart\n1. Create file `example.clj` with the code below:\n```Clojure\n(start-flow\n  \"Sample Flow\"\n  (fn [automator]\n    (-\u003e automator\n        (launch \"org.wikipedia\")\n        (tap-on {:text \"Search Wikipedia\"})\n        (assert-visible {:text \"Recent searches:\"})\n        (input-text \"Monad\")\n        (assert-visible {:text \"Monad (functional programming)\"}))))\n```\n2. Download `pico-automator.jar` from [Release page](https://github.com/aivanovski/pico-automator/releases) and run the test (in order to work, *pico-automator* requires Java 11 and ADB binary accessible from the PATH variable)\n```\njava -jar pico-automator.jar example.clj\n```\n\n## Usage\nThere are 2 ways to run tests with *pico-automator*:\n- With standalone CLI application `pico-automator.jar`\n- With Clojure REPL\n\n### Run tests with CLI application\nThe usage of CLI application is described in [Quickstart](https://github.com/aivanovski/pico-automator#quickstart) section.\n\n### Run tests with Clojure REPL\nThe Functional API for *pico-automator* is provided by [pico-automator-clojure](https://github.com/aivanovski/pico-automator-clojure) project, that can be used as a dependency inside `deps.edn` file. [pico-automator-clojure](https://github.com/aivanovski/pico-automator-clojure) is available in JitPack maven repository [here](https://jitpack.io/#aivanovski/pico-automator-clojure).\n\n1. Setup `deps.edn` file in the directory:\n```Clojure\n{:paths [\".\"]\n\n :mvn/repos\n {\"jitpack\" {:url \"https://jitpack.io/\"}}\n\n :deps\n {com.github.aivanovski/pico-automator-clojure {:mvn/version \"X.X.X\"}}\n\n :aliases\n {:repl-server {:extra-deps {nrepl/nrepl       {:mvn/version \"1.0.0\"}\n                             cider/cider-nrepl {:mvn/version \"0.37.0\"}}\n                :main-opts  [\"--main\"       \"nrepl.cmdline\"\n                             \"--middleware\" \"[cider.nrepl/cider-middleware]\"]}}}\n```\n\n2. Start the REPL server:\n```\nclojure -M:repl-server\n```\n\n3. Create file with the test:\n```Clojure\n(ns wikipedia-search\n  (:require [picoautomator.core :refer :all]))\n\n(defn -main\n  [\u0026 args]\n\n  (start-flow\n    \"Search Wikipedia\"\n    (fn [automator]\n      (-\u003e automator\n          (launch \"org.wikipedia\")\n          ... ; Implement your test steps here\n          ))))\n```\n\n4. Connect to the REPL and run it.\n\nThe example could be found [here](https://github.com/aivanovski/pico-automator/tree/main/samples/sample-clojure)\n\n## API overview\nThe api namespace is `picoautomator.core`.\n\n### Start the test\nFunction `start-flow` starts the test:\n```clojure\n(start-flow\n  \"Test Flow\"\n  (fn [automator]\n    (-\u003e automator\n        (launch \"org.wikipedia\"))))\n```\n\n### Launch application\nThe application could be launched with `launch` function:\n```clojure\n(-\u003e automator\n    (launch \"org.wikipedia\")) ;; specify your application id\n```\n\n### Indentify views\nFunctions that interact with views (for example `tap-on`, `assert-visible`, `input-text` and etc.) require the view paramaters to be specified as follows.\nBy view id:\n```clojure\n{:id \"viewId\"} ;; corresponds to R.id.viewId in android application\n```\nBy exact text:\n```clojure\n{:text \"Search Wikipedia\"}\n```\nBy content description:\n```clojure\n{:content-desc \"search-wikipedia\"}\n```\nBy patricular text matching:\n```clojure\n{:contains-text \"Wikipedia\"}\n```\n\n### Assertions\nTo assert whether an element is visbile or not visible following function could be used:\n```clojure\n(-\u003e automator\n    (assert-visible {:id \"viewId\"})\n    (assert-not-visible {:id \"viewId\"}))\n```\n\n### Clicks\nIn order to click/tap on view:\n```clojure\n(-\u003e automator\n    (tap-on {:id \"viewId\"})\n    (long-tap-on {:id \"viewId\"}))\n```\n\n### Input text\n```clojure\n(-\u003e automator\n    ;; Inputs text regardless of whether any text field is currently focused or not\n    (input-text \"Text\")\n\n    ;; Taps on view specified by view-parameters and then inputs text\n    (input-text \"Text\" {:id \"inputField\"}))\n```\n\n### Controlling test lifecycle\nIn order to finish test successfully or with a failure depend on some extenal condition, functions `complete` and `fail` could be used:\n```clojure\n(-\u003e automator\n    ;; Finishes test successfully and prints the message\n    (complete \"The test is finished successfully\")\n\n    ;; Finishes test with an error and prints the message\n    (fail \"The test is failed\"))\n```\n\n### Other functions\n```clojure\n(-\u003e automator\n    ;; Checks if view is visible and returns true of false\n    (visible? {:id \"viewId\"})\n\n    ;; Stops test execution for 5 seconds\n    (sleep {:seconds 5})\n\n    ;; Wait until view became visible on the screen for 15 seconds and checks every second\n    (wait-until {:text \"viewId\"} {:seconds 15} {:seconds 1})\n\n    ;; Returns object that represents view tree on the screen\n    (ui-tree))\n```\n\n## Examples\nMore examples could be found [here](https://github.com/aivanovski/pico-automator/tree/main/samples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivanovski%2Fpico-automator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faivanovski%2Fpico-automator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faivanovski%2Fpico-automator/lists"}