Skip to content

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

Notifications You must be signed in to change notification settings

born2ngopi/dolphin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages