Skip to content

Improving Unit Test Coverage with Gemini: proof of concept

Notifications You must be signed in to change notification settings

wrr/gemini-unit-tests-gen

Repository files navigation

Improving Unit Test Coverage with Gemini

A proof of concept script for improving unit test coverage of a project (keon/algorithms) using the Gemini LLM API. For more details, see the blog post.

The script executes code generated by the LLM. While in tests the model hasn't generated any damaging code, it is safest to isolate the script from the important files by running it in a VM or a Docker container:

./docker_activate.sh

Then, in the container, checkout keon/algorithm project, prepare venv and install dependencies by running:

./setup.sh

Finally, run the script:

source ./venv/bin/activate;
 export GEMINI_API_KEY='your API key from https://aistudio.google.com/'
python gemini_unit_tests_gen.py

About

Improving Unit Test Coverage with Gemini: proof of concept

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published