3.0.0 • Published 7 months ago

aitestgen v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

aitestgen

Generate testcases from natural language descriptions.

A command-line tool that leverages AI to automatically generate test cases from natural language prompts. This tool helps developers quickly create comprehensive test suites by describing what they want to test in plain English.

Requirements

Installation

yarn add -g aitestgen

Usage

Set OpenAI key

export OPENAI_API_KEY="<YOUR_KEY_HERE>"

Generate testsuite from test prompt file (todo.xml)

aitestgen gen -f examples/testprompts/todo.xml

the generated output will be saved at todo.test.ts

Choosing a Model

Currently, the best-performing model for test generation is gpt-4o-mini.
We are still searching for the ideal Ollama model for a self-hosted solution.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Clone the repository
git clone https://github.com/wuttinanhi/aitestgen
  1. Install dependencies
yarn install
  1. Run project tests
yarn test
  1. Link this package to use locally
yarn link

Yarn scripts

OptionDescription
startStart the program.
testRun project tests
lintLint codebase

License

MIT

Author

wuttinanhi

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.