Skip to content

Latest commit

Β 

History

292 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JAIPilot

One-Click AI Agent for Java Unit Testing

Version Downloads Build License

Features β€’ Installation β€’ Quick Start β€’ Documentation β€’ Contributing

Generate, run, and fix JUnit tests automatically β€” right inside IntelliJ IDEA


Why JAIPilot?

Writing comprehensive unit tests is time-consuming. JAIPilot eliminates the tedious work by generating intelligent, context-aware JUnit tests in seconds. Focus on building features while JAIPilot ensures your code is thoroughly tested.

The Problem

  • Writing unit tests manually is repetitive and time-consuming
  • Achieving high test coverage requires significant effort
  • Fixing failing tests often involves multiple iterations
  • Keeping tests up-to-date with code changes is tedious

The Solution

JAIPilot is an AI-powered IntelliJ IDEA plugin that:

  • Understands your code context, dependencies, and edge cases
  • Generates complete tests with meaningful assertions in seconds
  • Automatically fixes failing tests until they pass
  • Integrates seamlessly with your existing JUnit workflow

✨ Features

πŸ€– AI-Powered Test Generation

  • Context-aware analysis β€” understands method logic, parameters, dependencies, and edge cases
  • Intelligent test creation β€” generates meaningful test cases with proper assertions
  • Multiple test frameworks β€” supports all JUnit version

⚑ One-Click Automation

  • Right-click any class to instantly generate comprehensive test suites
  • Custom test locations β€” specify your preferred test root directory (e.g., src/test/java)

πŸ”„ Autonomous Test Refinement

  • Automatic test execution β€” runs generated tests immediately
  • Smart failure detection β€” identifies and analyzes test failures
  • Self-healing tests β€” automatically fixes failing tests until they pass
  • Iterative improvement β€” refines tests based on compilation and runtime errors

🎯 Optimized Performance

  • Dynamic model selection β€” chooses the best AI model per class for speed and accuracy
  • Resource efficient β€” minimal impact on IDE performance

πŸ”— Seamless Integration

  • Works out-of-the-box with existing Java projects
  • JUnit integration β€” fully compatible with your test infrastructure
  • IDE native experience β€” feels like a built-in IntelliJ feature
  • No configuration required β€” start generating tests immediately

πŸ†“ Free Credits to Get Started

  • 40 request attempts free on signup (~4 classes worth of test generation)
  • No credit card required β€” start generating tests immediately
  • Pay-as-you-go billing β€” top up credits after free tier

πŸ“¦ Installation

Install from JetBrains Marketplace (Recommended)

  1. Open IntelliJ IDEA
  2. Go to Settings/Preferences β†’ Plugins β†’ Marketplace
  3. Search for "JAIPilot" or "java-auto-unit-tests"
  4. Click Install and restart your IDE

πŸš€ Quick Start

1. Install and Activate JAIPilot

  1. Install JAIPilot from the JetBrains Marketplace and restart IntelliJ
  2. Sign up for a JAIPilot account at jaipilot.com (no credit card required)
  3. You'll receive 40 request attempts (~4 classes) worth of free credits
  4. Check your email for the license key (also available in your JAIPilot account page)
  5. In IntelliJ, go to Settings/Preferences β†’ Tools β†’ JAIPilot Plugin
  6. Paste your license key to activate test generation

2. Generate Your First Test

// Your Java class
public class Calculator {
    public int add(int a, int b) {
        return a + b;
    }

    public int divide(int a, int b) {
        if (b == 0) throw new IllegalArgumentException("Cannot divide by zero");
        return a / b;
    }
}

Steps:

  1. Right-click on the Calculator class
  2. Select "Generate Tests with JAIPilot"
  3. Choose your test root directory (e.g., src/test/java)
  4. Wait a few seconds while JAIPilot generates comprehensive tests
  5. Review the generated test file with full coverage

Generated Test (Example):

public class CalculatorTest {
    private Calculator calculator;

    @BeforeEach
    void setUp() {
        calculator = new Calculator();
    }

    @Test
    void testAdd_PositiveNumbers() {
        assertEquals(5, calculator.add(2, 3));
    }

    @Test
    void testAdd_NegativeNumbers() {
        assertEquals(-5, calculator.add(-2, -3));
    }

    @Test
    void testDivide_ValidInput() {
        assertEquals(2, calculator.divide(6, 3));
    }

    @Test
    void testDivide_ThrowsExceptionWhenDivideByZero() {
        assertThrows(IllegalArgumentException.class, () -> calculator.divide(10, 0));
    }
}

3. Let JAIPilot Fix Failing Tests

If any tests fail:

  • JAIPilot automatically detects failures
  • Analyzes error messages and stack traces
  • Regenerates and fixes tests until they pass
  • No manual intervention required

πŸ“š Documentation

Configuration

Configure JAIPilot settings in Settings/Preferences β†’ Tools β†’ JAIPilot:

  • License Key β€” enter your license key from email or account page to activate the plugin
  • Test Root Directory β€” specify where tests should be generated (default: src/test/java)

Important: You must activate your license key before generating tests. After signing up at jaipilot.com, you'll receive a license key via email. Paste this key in the plugin settings to start using JAIPilot.

Requirements

  • IntelliJ IDEA 2023.1 or later (Community or Ultimate)

Troubleshooting

Issue: Tests not generating Solution: Ensure your license key is activated in plugin settings and your project has JUnit dependencies

Issue: License key not working Solution: Copy the full license key from your email or account page. Ensure there are no extra spaces.

Issue: "No credits remaining" error Solution: Top up your credits at jaipilot.com/account with pay-as-you-go billing

Issue: Tests failing after generation Solution: Wait for JAIPilot's automatic refinement process to complete

For more issues, check our FAQ or open an issue.


🀝 Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

Ways to Contribute

  • πŸ› Report bugs
  • πŸ’‘ Suggest features
  • πŸ“– Improve documentation
  • πŸ”§ Submit pull requests
  • ⭐ Star the project to show your support

See our Contributing Guide for detailed instructions.


πŸ“Š Project Stats

GitHub stars GitHub forks GitHub watchers GitHub issues GitHub pull requests GitHub contributors

πŸ“ License

This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Built with the IntelliJ Platform Plugin SDK
  • Powered by advanced AI models for intelligent test generation
  • Inspired by the developer community's need for better testing tools

πŸ”— Links


Built with ❀️ by developers, for developers

If JAIPilot helps you ship faster, please consider giving it a ⭐ on GitHub!

Star on GitHub

About

IntelliJ experiment for AI-assisted Java unit-test generation and verification.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages