Skip to content

An Automated tests generation tool integrated To the CI pipeline.

License

Notifications You must be signed in to change notification settings

puneeth072003/CODESOURCERER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Last Commit Issues License Top Language


description

CODESOURCERER-bot

AI-powered tool for automated test generation in CI pipeline
Explore the repo Β»

Report Bug Β· Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Our tool seamlessly integrates with GitHub to automate test generation for code changes. It detects modifications in your repository, sends requests to a proxy server, and interacts with a Generative AI API to generate relevant tests. These tests are automatically added alongside the developer’s changes and merged into the main branch.

For a detailed workflow explanation, see below.

Workflow

description


The above image illustrates the working of CODESOURCERER in a GitHub-based development pipeline

Glossary

  • designated testing branch: A branch solely designated for our tool. It is the root branch from which changes are detected and tests are generated.

  • proxy server: Built using a microservices architecture, it is responsible for hosting all business logic.

  • github app: Acts as a middleman authorized in your repository to view code changes and raise PRs.

    Note: A PR is raised from a sandbox branch following the naming convention CS-Sandbox-<hash>.

Built With

This section lists the major frameworks and libraries used to bootstrap this tool.

  • Go
  • gRPC
  • Gemini Flash 2.0
  • Webflow
  • Redis

Getting Started

Follow these steps to set up the development environment for CODESOURCERER.

Prerequisites

Ensure you have the following installed:

  • Go (latest version)
  • Air (for hot-reloading)
  • Ngrok (for tunneling local services)

Setup Instructions

1. Fork and Clone the Repository

Fork the repository and then clone your forked version:

git clone https://github.com/puneeth072003/CODESOURCERER.git

Change into the project directory:

cd CODESOURCERER

2. Sync Dependencies

Run the following in the project root to set up Go modules:

go work sync

3. Install Dependencies for Individual Services

Navigate to the respective service directories and install dependencies:

cd services/gen-ai
go mod tidy
cd services/github
go mod tidy

4. Configure Environment Variables

Each service requires an .env file. Use the example .env files provided in the respective directories to configure your environment.

5. Install and Run Air for Hot Reloading

cd services/gen-ai
air

Open a new terminal and run the GitHub service:

cd services/github
air

6. Setup Ngrok for Local Webhook Development

Expose port 3000 using Ngrok:

ngrok http 3000

Note: Copy the generated Ngrok URL.

7. Configure GitHub App for Local Development

For development purposes, we recommend creating your own GitHub App with all necessary permissions. Update the webhook callback URL in this format:

<ngrok-url>/webhook

Now your development environment is set up and ready to go! πŸš€

Deployment

For detailed deployment instructions including Docker Compose, Kubernetes, Helm, Sealed Secrets, and FluxCD GitOps configurations, please refer to the comprehensive deployment guide:

πŸ“– Deployment Documentation

Quick Deployment Options

Method Best For Quick Start
Docker Compose Local development cd deployment/docker-compose && docker-compose up
Kubernetes + Helm Production deployments ./deployment/scripts/deploy-helm.ps1 install
FluxCD GitOps Automated deployments See deployment/README.md

The deployment guide includes:

  • βœ… Complete setup instructions for all deployment methods
  • βœ… Sealed Secrets configuration for secure secret management
  • βœ… FluxCD GitOps integration for automated deployments
  • βœ… Comprehensive troubleshooting guide
  • βœ… Security best practices and checklists
  • βœ… Architecture diagrams and service communication flows

Usage

We are currently working on comprehensive documentation covering various use cases. Stay tuned for updates!

In the meantime, feel free to explore the project and check back soon for detailed usage examples.

Roadmap

For the latest progress and advancements of the project, check out the Project Board.

See the open issues for a full list of proposed features and known issues.

Contributing

Contributions help improve this project and make it more robust. Any contributions you make are greatly appreciated.

If you have a suggestion to enhance the project, feel free to fork the repository and open a pull request. You can also create an issue with the tag "enhancement". Don't forget to give the project a ⭐!

Contribution Workflow

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/<feature_name>)
  3. Commit your Changes (git commit -m 'feat <issue_no>: breif description of commit)
  4. Push to the Branch (git push origin feature/<feature_name>)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Acknowledgments

This section lists research papers that have contributed to this project.

  • [1] Boyang Du, Sarah Azimi, Annarita Moramarco, Davide Sabena, Filippo Parisi, and Luca Sterpone,
    "An Automated Continuous Integration Multitest Platform for Automotive Systems",
    IEEE International Conference on Design, Automation & Test in Europe (DATE), 2021.
    Link

  • [2] N. Tillmann and W. Schulte,
    "Parameterized Unit Tests", IEEE Transactions on Software Engineering, 2010.
    Link

  • [3] G. Fraser and A. Arcuri,
    "EvoSuite: Automatic Test Suite Generation for Object-Oriented Software",
    ACM Transactions on Software Engineering and Methodology (TOSEM), 2014.
    Link

  • [4] M. Grechanik, Q. Xie, and C. Fu,
    "Automatically Finding Performance Problems with Feedback-Directed Learning Software Testing",
    IEEE International Conference on Software Engineering, 2012.
    Link

About

An Automated tests generation tool integrated To the CI pipeline.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •