Categorygithub.com/sentiens/goptest
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.

  1. Set OPENAI_API_KEY environment variable

  2. First generate specification for the tested code: goptest -cases=true -what="Add function" -spec-file=specs.yaml -code-files=testcode.go

  3. Review and edit specs.yml code

  4. Run to generate tests code goptest -spec-file=specs.yaml -code-files=testcode.go -output-file=generated_test.go