repositorypackage
0.0.0-20230710125639-7b4ea025a18b
Repository: https://github.com/sentiens/goptest.git
Documentation: pkg.go.dev
# README
[G]o[PT]est
Just don't ask about the name
Installation
go install github.com/sentiens/goptest@latest
Usage
Only GPT4 is supported. TODO: More configuration options.
-
Set OPENAI_API_KEY environment variable
-
First generate specification for the tested code:
goptest -cases=true -what="Add function" -spec-file=specs.yaml -code-files=testcode.go
-
Review and edit
specs.yml
code -
Run to generate tests code
goptest -spec-file=specs.yaml -code-files=testcode.go -output-file=generated_test.go