AI-powered tool for automated test generation in CI pipeline
Explore the repo Β»
Report Bug
Β·
Request Feature
Table of Contents
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.
The above image illustrates the working of CODESOURCERER in a GitHub-based development pipeline
-
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>.
This section lists the major frameworks and libraries used to bootstrap this tool.
Follow these steps to set up the development environment for CODESOURCERER.
Ensure you have the following installed:
- Go (latest version)
- Air (for hot-reloading)
- Ngrok (for tunneling local services)
Fork the repository and then clone your forked version:
git clone https://github.com/puneeth072003/CODESOURCERER.gitChange into the project directory:
cd CODESOURCERERRun the following in the project root to set up Go modules:
go work syncNavigate to the respective service directories and install dependencies:
cd services/gen-ai
go mod tidy
cd services/github
go mod tidyEach service requires an .env file. Use the example .env files provided in the respective directories to configure your environment.
cd services/gen-ai
airOpen a new terminal and run the GitHub service:
cd services/github
airExpose port 3000 using Ngrok:
ngrok http 3000Note: Copy the generated Ngrok URL.
For development purposes, we recommend creating your own GitHub App with all necessary permissions. Update the webhook callback URL in this format:
<ngrok-url>/webhookNow your development environment is set up and ready to go! π
For detailed deployment instructions including Docker Compose, Kubernetes, Helm, Sealed Secrets, and FluxCD GitOps configurations, please refer to the comprehensive deployment guide:
| 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
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.
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.
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 β!
- Fork the repository
- Create a new branch (
git checkout -b feature/<feature_name>) - Commit your Changes (
git commit -m 'feat <issue_no>: breif description of commit) - Push to the Branch (
git push origin feature/<feature_name>) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
- Dev team: [email protected]
- Youtube Link: @Codesourcerer-bot
- Project Link: https://github.com/puneeth072003/CODESOURCERER
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
