Unit test generator for npm packages using LLMs
Top 58.5% on sourcepulse
TestPilot is a research prototype for automatically generating unit tests for JavaScript/TypeScript npm packages using large language models (LLMs). It targets researchers and developers exploring LLM-based test generation, offering a framework that requires no additional training data.
How It Works
TestPilot prompts an LLM with a test skeleton, including function signatures, body, and examples mined from documentation. The LLM's response is parsed into a runnable unit test. Optionally, failed tests trigger re-prompting with failure details for refinement. This approach avoids the need for example test-function pairs or reinforcement learning.
Quick Start & Requirements
npm install
and npm run build
in the root directory).TESTPILOT_LLM_API_ENDPOINT
and TESTPILOT_LLM_AUTH_HEADERS
environment variables.mocha
for testing if not already a project dependency.Highlighted Details
Maintenance & Community
neu-se/testpilot2
.Licensing & Compatibility
Limitations & Caveats
This version is archived and intended for research. For daily use, Copilot Chat is recommended. Reproduction mode may encounter issues with replaying refined tests due to system-specific failure messages.
6 months ago
Inactive