https://github.com/atikahe/auto-test
Automatically generate unit-test for your code from the CLI.
https://github.com/atikahe/auto-test
auto-test cli codex openai unit-test
Last synced: about 2 months ago
JSON representation
Automatically generate unit-test for your code from the CLI.
- Host: GitHub
- URL: https://github.com/atikahe/auto-test
- Owner: atikahe
- License: mit
- Created: 2023-01-15T14:47:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-18T15:29:56.000Z (over 3 years ago)
- Last Synced: 2025-03-28T18:51:53.714Z (over 1 year ago)
- Topics: auto-test, cli, codex, openai, unit-test
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🤖 auto-test
[](https://opensource.org/licenses/MIT)
Automatically generate test file for your code from the CLI so you don't need to start from scratch ✨ Built with OpenAI's Codex.
## Installation
- Install from terminal,
```
curl -fsSL https://raw.githubusercontent.com/atikahe/auto-test/main/install.sh | sh -
```
- or download the program's binary that corresponds to your OS from the [release page](https://github.com/atikahe/auto-test/releases/latest).
## Usage
- Get access to OpenAI Beta and copy your API Key [here](https://beta.openai.com/account/api-keys).
```bash
export OPENAI_API_KEY=YOUR_API_KEY
```
- Go to the directory of code that you want to test.
- Run auto-test
```bash
auto-test -f file_name.py
```
- See generated test file on the same folder, make some modification as the code won't be complete.
- To add custom prompt, use `-p` flag followed by a string of prompt.
```
auto-test -f file_name.py -p "This is additional prompt"
```
- To overwrite default prompt, use `-o` flag.
- Use `auto-test --help` for more info.
## Disclaimer
This package is not intended to replace the writing of unit-test by AI entirely. You will still need to make adjustments and mock some dependencies manually.
## Resources
- [OpenAI Codex](https://openai.com/blog/openai-codex/)