{"id":10504674,"url":"https://github.com/zachblume/autospec","last_synced_at":"2025-09-10T11:32:31.503Z","repository":{"id":241393599,"uuid":"803524784","full_name":"zachblume/autospec","owner":"zachblume","description":"Autospec is an open-source AI agent that takes a web app URL and autonomously QAs it, and saves its passing specs as E2E test code","archived":false,"fork":false,"pushed_at":"2025-02-01T16:07:38.000Z","size":1302,"stargazers_count":56,"open_issues_count":21,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-01T10:27:19.562Z","etag":null,"topics":["agent","ai","e2e","end-to-end","gemini","gemini-flash","gpt","gpt-4","openai","playwright","test"],"latest_commit_sha":null,"homepage":"https://autospec.dev","language":"TypeScript","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/zachblume.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}},"created_at":"2024-05-20T22:23:33.000Z","updated_at":"2025-06-03T07:55:53.000Z","dependencies_parsed_at":"2024-06-15T23:23:54.600Z","dependency_job_id":"862fcd6a-98d4-49db-aed6-a0d508d8558a","html_url":"https://github.com/zachblume/autospec","commit_stats":null,"previous_names":["zachblume/autospec"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zachblume/autospec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachblume%2Fautospec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachblume%2Fautospec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachblume%2Fautospec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachblume%2Fautospec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachblume","download_url":"https://codeload.github.com/zachblume/autospec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachblume%2Fautospec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274455388,"owners_count":25288557,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"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":["agent","ai","e2e","end-to-end","gemini","gemini-flash","gpt","gpt-4","openai","playwright","test"],"created_at":"2024-05-30T14:03:01.978Z","updated_at":"2025-09-10T11:32:31.091Z","avatar_url":"https://github.com/zachblume.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Building","Agent Categories"],"sub_categories":["Testing","\u003ca name=\"Unclassified\"\u003e\u003c/a\u003eUnclassified"],"readme":"# autospec\n\n### Open source end-to-end (e2e) test generation for web apps\n\n[Code Entrypoint](https://github.com/zachblume/autospec/blob/main/src/index.ts)\n\nAutospec is an end-to-end test/QA agent, using vision and text language models\nto explore and generate commonsense test specifications for web applications.\nIt aims to mimic user-like judgement on the entire UI output after each\ninteraction to decide whether to raise an error about how an application\nbehaves, instead of catching regressions against rigidly defined previous\nbehavior.\n\n-   This approach allows autospec to test new features immediately after\n    implementation, not just check for regressions.\n-   It requires no configuration, making it straightforward to use.\n\n### Quick start\n\nGenerate and run 10 specs on TodoMVC, a classic example web app:\n\n\u003c!-- prettier-ignore --\u003e\n```\nnpx autospecai --url https://todomvc.com/examples/react/dist/ --apikey YOUR_OPENAI_API_KEY\n```\n\nYou'll need to say \"yes\" to install the autospecai package, and the first run\nmay take a few minutes to download dependencies like browser binaries that are\nused to execute the test environment.\n\nWhen the run completes, you'll see a summary of the tests that were run and\nwhether they passed or failed.\n\nThe successful specs will be saved within the `trajectories` folder in your\nworking directory. You can re-execute these tests at any time by running:\n\n\u003c!-- prettier-ignore --\u003e\n```\nnpx playwright test\n```\n\nDepending on your existing Playwright setup, you may need to add \"trajectories\"\nto the testDir in your playwright.config.js file.\n\n### Using environment variables instead of passing keys as a flag\n\nCopy the sample .env file, and fill in the OPENAI_API_KEY\nor GOOGLE_GENERATIVE_AI_API_KEY before running the app:\n\n\u003c!-- prettier-ignore --\u003e\n```bash\nmv .env.example .env # rename the example to .env\nnano .env # edit as you like\n```\n\n### Learn more about configuration\n\n\u003c!-- prettier-ignore --\u003e\n```bash\n\u003e npx autospecai --help\n    Usage: npx autospecai --url \u003curl\u003e [--model \u003cmodel\u003e] [--spec_limit \u003climit\u003e] [--help | -h]\n\n    Required:\n    --url \u003curl\u003e          The target URL to run the autospec tests against.\n\n    Optional:\n    --help, -h           Show this help message.\n    --spec_limit \u003climit\u003e The max number of specs to generate. Default 10.\n    --model \u003cmodel\u003e      The model to use for spec generation\n                            * \"gpt-4o\" (default)\n                            * \"gemini-1.5-flash-latest\"\n                            * \"claude-3-haiku\"\n                            * (note: Gemini flash is free up to rate limits)\n    --apikey \u003ckey\u003e       The relevant API key for the chosen model's API.\n                            * If not specified, we'll fall back on the\n                            following environment variables:\n                            * OPENAI_API_KEY\n                            * GOOGLE_GENERATIVE_AI_API_KEY\n                            * ANTHROPIC_API_KEY\n\n```\n\n## Example output\n\nLogs are printed to the console like so, as well as to a trajectories/\\*\\*\nfolder alongside a video, png and HTML/JSON DOM snapshots:\n\n\u003c!-- prettier-ignore --\u003e\n```\nTest Summary:\n✔ 1. Check if the page loads successfully\n  1.1) action: markSpecAsComplete, reason: The spec passed, fullProseExplanationOfReasoning100charmax: The page loaded successfully with all expected elements visible., planningThoughtAboutTheActionIWillTake: The page has loaded successfully as indicated by the presence of the header, input field, and footer. I will mark the spec as complete.\n✔ 2. Check if the title 'todos' is displayed\n  2.1) action: markSpecAsComplete, reason: The spec passed, fullProseExplanationOfReasoning100charmax: The title 'todos' is displayed as an h1 element in the header section., planningThoughtAboutTheActionIWillTake: I will verify if the title 'todos' is displayed by checking the presence of the h1 element with the text 'todos'.\n✔ 3. Check if the input box with placeholder 'What needs to be done?' is present\n  3.1) action: markSpecAsComplete, reason: The spec passed, fullProseExplanationOfReasoning100charmax: The input box with the placeholder 'What needs to be done?' is present in the HTML snapshot., planningThoughtAboutTheActionIWillTake: I will check if the input box with the placeholder 'What needs to be done?' is present in the HTML snapshot.\n✔ 4. Check if a new todo item can be added\n  4.1) action: clickOn, cssSelector: input.new-todo, nth: 0, planningThoughtAboutTheActionIWillTake: I will move the mouse cursor to the input field to add a new todo item.\n  4.2) action: keyboardInputString, cssSelector: input.new-todo, nth: 0, string: Buy groceries, planningThoughtAboutTheActionIWillTake: I will type a new todo item into the input field.\n  4.3) action: keyboardInputSingleKey, cssSelector: input.new-todo, nth: 0, key: Enter, planningThoughtAboutTheActionIWillTake: I will press the Enter key to add the new todo item.\n  4.4) action: markSpecAsComplete, reason: The spec passed, fullProseExplanationOfReasoning100charmax: The new todo item 'Buy groceries' was successfully added to the list., planningThoughtAboutTheActionIWillTake: I will mark the spec as complete because the new todo item 'Buy groceries' has been successfully added.\n✔ 5. Check if a todo item can be marked as completed\n  5.1) action: keyboardInputString, cssSelector: input.new-todo, nth: 0, string: Test Todo Item, planningThoughtAboutTheActionIWillTake: To check if a todo item can be marked as completed, I first need to add a new todo item. I will type a new todo item in the input field and press Enter.\n  5.2) action: keyboardInputSingleKey, cssSelector: input.new-todo, nth: 0, key: Enter, planningThoughtAboutTheActionIWillTake: I need to press Enter to add the new todo item to the list.\n  5.3) action: clickOn, cssSelector: input.toggle, nth: 0, planningThoughtAboutTheActionIWillTake: Now that the todo item is added, I will mark it as completed by clicking the checkbox next to the todo item.\n  5.4) action: markSpecAsComplete, reason: The spec passed, fullProseExplanationOfReasoning100charmax: The todo item was successfully marked as completed., planningThoughtAboutTheActionIWillTake: The todo item has been marked as completed, as indicated by the strikethrough text and the checkbox being checked. I will mark the spec as complete.\n...\nautospec passed for https://todomvc.com/examples/react/dist/\n```\n\n### Contributing\n\nautospec is open-source and we welcome contributors! Please open an\n[issue](https://github.com/zachblume/autospec/issues) or\n[pull request](https://github.com/zachblume/autospec/pulls) to get started.\n\n### Contributors\n\n\u003ca href=\"https://github.com/zachblume/autospec/graphs/contributors\"\u003e\u003cimg src=\"https://contrib.rocks/image?repo=zachblume/autospec\" /\u003e\u003c/a\u003e\n\n### License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachblume%2Fautospec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachblume%2Fautospec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachblume%2Fautospec/lists"}