8000 GitHub - atikahe/auto-test: Automatically generate unit-test for your code from the CLI.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atikahe/auto-test

Repository files navigation

🤖 auto-test

License: 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.

Usage

  • Get access to OpenAI Beta and copy your API Key here.
export OPENAI_API_KEY=YOUR_API_KEY
  • Go to the directory of code that you want to test.
  • Run auto-test
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

About

Automatically generate unit-test for your code from the CLI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0