Show HN: One-Click Java JUnit Unit Test Generator with AI Agent

1 surajkrajan 1 8/18/2025, 3:06:14 PM plugins.jetbrains.com ↗
I’m a senior java dev who got frustrated with writing and maintaining JUnit tests for Java projects.

General AI tools like Cursor are great, but I found them clunky for test generation especially for larger classes. Since I live inside IntelliJ every day, I built JAIPilot as a lightweight plugin that just works in the Java developer’s natural workflow.

What it does: Right-click any class → Generate Tests Extracts code context, dependencies, and mocks automatically Runs in a self-correcting loop until tests compile and pass Saves the generated tests in src/test/java

Why it’s different: Built natively for IntelliJ, so no context switching. Focused only on JUnit test generation (not a general-purpose AI IDE). In the free plan, it works with your own Gemini API key (BYOK), so you control costs. I have a Pro plan as well if better performance is required.

I’ve been dogfooding it daily on my own projects, and early users say it saves hours of boilerplate. It’s free to try, with a Pro version if you need heavier usage.

I’d love feedback:

Does this solve a real pain point for you? What’s missing before you’d use it in production? How does it compare to your experience with Cursor?

Thanks! Happy to answer all questions in the thread.

Comments (1)

surajkrajan · 1h ago
Some technical details - Under the hood, JAIPilot uses IntelliJ’s PSI for code context extraction and wraps Gemini in an agentic retry loop until the generated tests compile. Code here : https://github.com/skrcode/java-auto-unit-tests

Would be very interested to hear if anyone has tried different approaches for reliable AI-generated tests.