Generate testcases from natural language descriptions.
npm install aitestgenGenerate 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.
- Node.js
``bash`
yarn add -g aitestgen
Set OpenAI key
`bash`
export OPENAI_API_KEY="
Generate testsuite from test prompt file (todo.xml)
`bash`
aitestgen gen -f examples/testprompts/todo.xml
the generated output will be saved at todo.test.ts
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.
Contributions are welcome! Please feel free to submit a Pull Request.
1. Clone the repository
`bash`
git clone https://github.com/wuttinanhi/aitestgen
2. Install dependencies
`bash`
yarn install
3. Run project tests
`bash`
yarn test
4. Link this package to use locally
`bash`
yarn link
| Option | Description |
|--------|-------------|
| start | Start the program. |test
| | Run project tests |lint` | Lint codebase |
|
MIT
wuttinanhi
If you encounter any issues or have questions, please file an issue on the GitHub repository.