{"id":21585430,"url":"https://github.com/testdriverai/action","last_synced_at":"2025-04-10T20:08:04.868Z","repository":{"id":224856125,"uuid":"758502916","full_name":"testdriverai/action","owner":"testdriverai","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T22:52:43.000Z","size":1351,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T00:03:56.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/testdriverai.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-16T13:14:48.000Z","updated_at":"2025-03-20T22:52:47.000Z","dependencies_parsed_at":"2024-04-02T18:26:45.543Z","dependency_job_id":"0501059c-bab1-4f4f-9eda-8356bfd9c783","html_url":"https://github.com/testdriverai/action","commit_stats":null,"previous_names":["dashcamio/testdriver","testdriverai/testdriver"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testdriverai%2Faction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testdriverai%2Faction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testdriverai%2Faction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testdriverai%2Faction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testdriverai","download_url":"https://codeload.github.com/testdriverai/action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288347,"owners_count":21078903,"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":[],"created_at":"2024-11-24T15:10:40.556Z","updated_at":"2025-04-10T20:08:04.857Z","avatar_url":"https://github.com/testdriverai.png","language":"JavaScript","readme":"![TestDriver_1](https://github.com/dashcamio/testdriver/assets/318295/2a0ad981-8504-46f0-ad97-60cb6c26f1e7)\n\n# TestDriver.ai\n\nNext generation autonomous AI agent for end-to-end testing of web \u0026 desktop\n\n[Docs](https://docs.testdriver.ai) | [Website](https://testdriver.ai) | [Join our Discord](https://discord.gg/ZjhBsJc5)\n\nTestDriver isn't like any test framework you've used before - it's more like your own QA employee with their own development environment. \n\nTestDriver uses AI to understand what's on the screen, move the mouse and operate the keyboard. This kind of black-box testing has some major advantages:\n\n- **Easier set up:** No need to add test IDs or craft complex selectors\n- **Less Maintenance:** Tests don't break when code changes\n- **More Power:** TestDriver can test any application and control any OS setting\n\n# How to deploy a test\n\n1. Tell TestDriver what to do in natural language on your local machine using `npm i testdriverai -g` \n2. TestDriver looks at the screen and uses mouse and keyboard emulation to accomplish the goal\n3. Run TestDriver tests on our test infrastructure (this github action)\n\n# How it works (in detail)\n\n1. Spawn a Mac1 VM\n2. Clone your repository (optional)\n4. Runs `prerun.sh`\n5. Spawns AI Agent with prompt\n6. Reads step\n7. Looks at screen, reads text and describes images\n8. Determines what actions it needs to take to reach goal of prompt step\n9. Executes actions\n10. Agent summarizes results\n\n# Example Workflow\n\nThis is an example workflow that [Wave Terminal](https://github.com/wavetermdev/waveterm) uses to test their electron application nightly and on every feature branch and send the results to Slack.\n\n```yml\nname: TestDriver.ai\n\non:\n  push:\n    branches: [\"main\"]\n  pull_request:\n    branches: [\"main\"]\n  workflow_dispatch:\n\njobs:\n  test:\n    name: \"TestDriver\"\n    runs-on: ubuntu-latest\n    steps:\n      - uses: testdriverai/action@main\n        id: testdriver\n        with:\n          prompt: |\n            1. focus the Wave application with Spotlight\n            2. click \"Continue\"\n            3. focus the Wave input with the keyboard shorcut Command + I\n            4. type 'ls' into the input\n            5. press return\n            6. validate Wave shows the result of 'ls'\n      - name: Send custom JSON data to Slack workflow\n        id: slack\n        if: ${{ always() }}\n        uses: slackapi/slack-github-action@v1.25.0\n        with:\n          # This data can be any valid JSON from a previous step in the GitHub Action\n          payload: |\n            {\n              \"link\": \"${{ steps.testdriver.outputs.link }}\",\n              \"summary\": ${{ toJSON(steps.testdriver.outputs.summary)}}\n            }\n        env:\n          SLACK_WEBHOOK_URL: \"https://hooks.slack.com/triggers/xxx/yyy/zzz\"\n```\n\n# Prerun Script\n\nTestDriver will look for a script in `./testdriver/prerun.sh` and execute this before the AI prompt.\n\n## Launch Chrome\n\n```sh\nnpm install dashcam-chrome --save\n/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --load-extension=./node_modules/dashcam-chrome/build/ 1\u003e/dev/null 2\u003e\u00261 \u0026\nexit\n```\n\n## Build an Electron App (Taken from Wave Terminal)\n\n```sh\nbrew install go\nbrew tap scripthaus-dev/scripthaus\nbrew install scripthaus\nnpm install -g yarn\nmkdir ~/build\ncd ~/build\ngit clone https://github.com/wavetermdev/waveterm.git\ncd waveterm\nscripthaus run build-backend\necho \"Yarn\"\nyarn\necho \"Rebuild\"\nscripthaus run electron-rebuild\necho \"Webpack\"\nscripthaus run webpack-build\necho \"Starting Electron\"\nscripthaus run electron 1\u003e/dev/null 2\u003e\u00261 \u0026\necho \"Electron Done\"\nexit\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestdriverai%2Faction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestdriverai%2Faction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestdriverai%2Faction/lists"}