https://github.com/anandsundaramoorthysa/keploy-session5-cpp-test

https://github.com/anandsundaramoorthysa/keploy-session5-cpp-test

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: anandsundaramoorthysa
  • Language: C++
  • Default Branch: main
  • Size: 57.6 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 12 months ago · Last pushed 12 months ago
Metadata Files
Readme

README.md

🧪 Keploy Session 5 – C++ Unit Test Generator

📚 Table of Contents

📌 About Project

This repository is part of Keploy API Fellowship – Session 5.
It demonstrates a C++ Unit Test Generator system using:

  • GoogleTest framework
  • Local LLM (deepseek-coder via Ollama)
  • Custom YAML and text prompts
  • Test automation with g++ and gcov for coverage

The project focuses on generating, refining, and running unit tests on real C++ code using LLMs and open-source tools.

⚙️ Installation

1. Clone the repository:

bash git clone https://github.com/anandsundaramoorthysa/Keploy-Session5-CPP-Test.git cd Keploy-Session5-CPP-Test `

2. Install requirements:

bash pacman -Syu pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gtest

  • Install Python libraries:

bash pip install pyyaml

  • Run Ollama & pull LLM model:

bash ollama pull deepseek-coder

🚀 Use / Run the Project

1. Generate Unit Tests using LLM:

bash python generate_tests.py

This uses:

  • prompts/student_prompt.yaml
  • prompts/initial_prompt.txt
  • src/student.cpp

It generates:

  • tests/test_student.cpp

2. Compile and Run the Test Binary:

bash g++ -std=c++17 tests/test_student.cpp src/student.cpp -o student_test.exe -lgtest -lgtest_main -lpthread ./student_test.exe

✨ Features

  • ✅ GoogleTest-based unit testing
  • ✅ YAML + natural language prompts for test generation
  • ✅ Compatible with deepseek-coder via Ollama
  • ✅ Coverage-ready with gcov
  • ✅ Lightweight, offline-friendly development

🖼️ Screenshot

Test result output:

Test Result

📬 Contact Me

If you have any questions, ideas, or would like to collaborate on future AI + Testing projects, feel free to reach out:

Owner

  • Name: ANAND SUNDARAMOORTHY SA
  • Login: anandsundaramoorthysa
  • Kind: user
  • Location: Madurai, Tamilnadu

LCM'25 | Tech Enthusiast | Front-End Developer | Blog Writer | Java Full Stack Learner

GitHub Events

Total
  • Push event: 4
  • Create event: 2
Last Year
  • Push event: 4
  • Create event: 2