Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.65 KB

README.md

File metadata and controls

59 lines (38 loc) · 1.65 KB

Dolphin

Dolphin is auto generate test case for golang and very simple to use it.

It's generate with llama on local machine (this verry dependend on your machine), and also can generate with google gemini and openai.

Demo With Llama

Hardware for testing:

  • Processor AMD Ryzen 7 7840HS
  • GPU Nvidia RTX 4050 6GB laptop
  • RAM 16GB

Source code for test here and result in here

WATCH

Problem & Motivation

write test case is very boring and take a lot of time, so i create this tool to generate test case

to run

you just run command

with ollama

dolphin generate -r="." --mock-path="./mock" --mock-lib="gomock" --llm="ollama" --model="codegemma:7b"

if you have other host, you can use this command

dolphin generate -r="." --mock-path="./mock" --mock-lib="gomock" --llm="ollama" --model="codegemma:7b" --llm-host="https://yourhost.com"

with gemini

dolphin generate -r="." --mock-path="./mock" --mock-lib="gomock" --llm="gemini" --llm-token="abc" --model="gemini:7b"

with openai

dolphin generate -r="." --mock-path="./mocks" --mock-lib="gomock" --llm="openai" --model="gpt-4o-mini" --llm-token="abc"

if you want to generate test case for spesific dir

dolphin generate -r="." --dir="./user" --mock-path="./mock" --mock-lib="gomock"

or for spesific function

dolphin generate -r="." --mock-path="./mock" --mock-lib="gomock" --func="TestFunc" --file="./somefolder/test.go"