A lightweight AI agent system that automates unit testing. This tool reads your Python code, generates pytest
unit tests using the LM Studio API, and saves them for execution. It is designed to simplify and accelerate the testing process.
- Automatically generates
pytest
unit tests for your Python code. - Covers normal cases, edge cases, and invalid inputs.
- Uses LM Studio API for AI-driven test generation.
- Test Generator Agent: Generate pytest unit tests.
- Test Runner Agent: Run pytest, collect results (via subprocess or log parsing).
- Failure Analyzer Agent: Analyze which tests failed and why, and suggest code or test fixes.
- Bug Reporter Agent: Analyzing test failures and generating detailed bug reports.
- Test Cases Generator Agent: Create test cases based on user stories or functional requirements.
Ensure Python 3.8+ is installed on your system. Verify by running:
python3 --version
git clone https://github.com/adi-testing/qa-agent-stack.git
cd qa-agent-stack
- Download and install LM Studio from LM Studio's official website.
- Start the LM Studio server locally.
- Configure the server to run on http://127.0.0.1:1234.
- Load the desired AI model (e.g., mistral-7b-instruct).
- Ensure the server is running and accessible by testing the endpoint:
curl http://127.0.0.1:1234/v1/chat/completions
Create a virtual environment:
python3 -m venv venv
Activate the virtual environment: On macOS/Linux:
source venv/bin/activate
On Windows:
.\venv\Scripts\activate
Ensure the LM Studio server is running.
Run the agents:
python main.py
- Python
- Pytest
- Open Source LLM