Autotester - E2E testing for your codebase
Project description
Autotester
Autotester is an open-source testing automation tool to make E2E automated.
- 🤖 Run end-to-end tests using natural language descriptions
- 🐛 Detect potential bugs and provide detailed fix explanations
- ⚡ Reduce testing overhead while improving code quality
Currently supporting Python and TypeScript, with more languages coming soon.
Quickstart
Install the package
pip install autotester
Add a config file to your project called autotester.yml. This tells Autotester what to test and how.
e2e:
login-test: # Name of the test. You can add more
url: "localhost:3000" # Starting URL of your app. It can be a local server or a remote server
steps:
- Login with Github
- Go to the team page
- Change the team name to "e2e"
- Click on the "Save" button
- Check that the team name is "e2e" # use words like "Check that" to assert the results of the test
If your environment is protected by HTTP Basic Auth, add an auth block:
e2e:
auth:
type: basic
username: "dev"
password: "dev123"
login-test:
url: "https://staging.example.com"
steps:
- Check the homepage loads
You can also provide auth credentials via environment variables (these take precedence over YAML):
export AUTOTESTER_AUTH_USERNAME="dev"
export AUTOTESTER_AUTH_PASSWORD="dev123"
That's it. To run it, you need to have an OpenAI API key and Chrome/Chromium installed.
If you don't already have Chrome installed, you can use the browser-use CLI to install Chromium:
browser-use install
Then export your OpenAI key and run:
export OPENAI_API_KEY="your-openai-api-key"
autotester
You will get a summary report like the following:
🖥️ 1/1 E2E tests
login-test: Success!
GitHub Action
Autotester can be used in a GitHub Action to run E2E tests after you release a new version.
Check out the action's README for more information, but here's a quick example:
name: Run Autotester
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
after-deployment:
runs-on: ubuntu-latest
steps:
- uses: cyberwave-os/autotester-action@v0.1.0
with:
action-type: "e2e"
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
STARTING_URL: "http://yourstaging.yourwebsite.com"
# Optional: for Basic Auth protected environments
# AUTOTESTER_AUTH_USERNAME: ${{ secrets.AUTOTESTER_AUTH_USERNAME }}
# AUTOTESTER_AUTH_PASSWORD: ${{ secrets.AUTOTESTER_AUTH_PASSWORD }}
CLI Reference
Commands
autotester: Without any command, runs E2E tests if defined in autotester.ymlautotester e2e: Runs end-to-end tests defined in autotester.yml
Command Options
Global Options
-v, --verbose: Enable verbose logging output--version: Display Autotester version number
E2E Test Command
autotester e2e [--config <config_file>] [--verbose]
--config: (Optional) Path to the YAML configuration file (defaults to autotester.yml)-v, --verbose: (Optional) Enable verbose logging output
Environment Variables
OPENAI_API_KEY: (Required) Your OpenAI API keyCHROME_INSTANCE_PATH: Path to your Chrome instance. Defaults to/Applications/Google Chrome.app/Contents/MacOS/Google ChromeAUTOTESTER_AUTH_USERNAME: Username for HTTP Basic Auth (overridesauth.usernamein YAML)AUTOTESTER_AUTH_PASSWORD: Password for HTTP Basic Auth (overridesauth.passwordin YAML)
Run Tests with Docker
For contributors who want a reproducible test environment, you can run the test suite in Docker.
From the repository root:
make test-docker
This command mounts your local project into the container and runs pytest.
If you want to build manually first:
make test-docker-build
docker compose -f tests/docker-compose.yml run --rm test
Roadmap
- Add support for simple auth, since test environment often have auth.
- Add support for screen recording with Posthog, so that QA engineers can easily review failed tests.
Credits
- Powered by BrowserUse
- This project evolved from an earlier open-source project developed by Tailor Media Inc, relased under Apache 2.0 Codebeaver
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autotester-0.0.7.tar.gz.
File metadata
- Download URL: autotester-0.0.7.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f490df8077b98c468bfe2a851b2b4a297635ca35e09e6a8d69dd7fa072d7ea3
|
|
| MD5 |
ed0560993a043592ffc44bec94824ffa
|
|
| BLAKE2b-256 |
5a3d8082595590afc62439ccdb79c4fc1e3572370c211b5a604c003cf63a6ecf
|
Provenance
The following attestation bundles were made for autotester-0.0.7.tar.gz:
Publisher:
release.yml on cyberwave-os/autotester
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autotester-0.0.7.tar.gz -
Subject digest:
5f490df8077b98c468bfe2a851b2b4a297635ca35e09e6a8d69dd7fa072d7ea3 - Sigstore transparency entry: 1059427148
- Sigstore integration time:
-
Permalink:
cyberwave-os/autotester@c94698a30cb4aa5694bdb0c7919739b5b3582854 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c94698a30cb4aa5694bdb0c7919739b5b3582854 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autotester-0.0.7-py3-none-any.whl.
File metadata
- Download URL: autotester-0.0.7-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93ee730b623265620a92e617eaa6c6c5ac848237cf2119de69c371f1fa4aaab6
|
|
| MD5 |
d75218b061b5bd7f1690f2013861973f
|
|
| BLAKE2b-256 |
f8cf4761579b78e07d9e531b7a7caa0ee63a7bd629f3b67aa05f11382eafcf0d
|
Provenance
The following attestation bundles were made for autotester-0.0.7-py3-none-any.whl:
Publisher:
release.yml on cyberwave-os/autotester
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autotester-0.0.7-py3-none-any.whl -
Subject digest:
93ee730b623265620a92e617eaa6c6c5ac848237cf2119de69c371f1fa4aaab6 - Sigstore transparency entry: 1059427149
- Sigstore integration time:
-
Permalink:
cyberwave-os/autotester@c94698a30cb4aa5694bdb0c7919739b5b3582854 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cyberwave-os
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c94698a30cb4aa5694bdb0c7919739b5b3582854 -
Trigger Event:
push
-
Statement type: