Tools

AI unit test generator

Generate a runnable test file for Jest, Vitest, pytest, Go, JUnit and more from a single function.

Your key, or hosted with creditsAI assistants5.6K
Get a key

Your key stays in your browser.It goes straight to the provider, never to our servers, and we neither log nor keep it. Use a dedicated key with a spending cap, and delete it in the provider's dashboard when you are done.

Input

Result

The result will appear here.

Paste a function or a module, choose the test framework, and get a complete test file: the normal path, each branch, boundary values such as empty, zero, negative and non-ASCII input, and every error the code raises. The instructions borrow from qodo-ai/qodo-cover, a coverage-driven test agent: mock only external boundaries, keep tests deterministic, and assert real behaviour. When a correct test would fail because the code has a bug, it is marked "BUG?:" instead of quietly asserting the wrong result.

How it works

  • Frameworks on offer: Vitest, Jest, pytest, Go's testing package, JUnit 5, xUnit.net, PHPUnit, RSpec and Rust's #[test] — or let it pick the usual one for the language.
  • Output is only the test file, with the assumed import path in a comment at the top so you can fix it before running.
  • Time, randomness and network are mocked or frozen with the framework's own tools, so the tests do not flake in CI.

Where your data goes

With your own key, what you type and the key go from your browser straight to the provider you choose; neither passes through Hysen Labs. In hosted mode, your text goes through our server to our provider (DeepSeek) and is billed in credits; we keep the token counts and cost of each run for billing, never the text itself or the answer. How the provider handles the text is governed by its own privacy policy.

This tool handles keys and credentials, so nothing about a run is saved, not even to your own history.

About your API key

We do not collect, store or leak your key: it lives only in this page's memory (unless you tick “remember in this tab”) and is gone when you close it. Still, treat any key you have pasted into a web page with care — create a dedicated key with a spending cap for use here, and delete or rotate it in your provider's dashboard when you are done.

What it costs

This tool is free, with no sign-in and no points.

Common questions

Will the tests pass first time?
Often, not always. The model cannot run your code, so check the import path, any fixtures it assumed, and every expected value it computed by hand. Run them — a failing generated test is either a model mistake or a real bug, and both are worth a look.
How is this different from qodo-cover itself?
qodo-cover runs in your repository, executes the tests and iterates on a coverage report. This tool is one pass with no access to your project: faster to try, but you are the one who runs the tests. For whole-repo coverage work, use qodo-cover.
Where does my code go?
From your browser to the AI provider you selected, authenticated with your key — never to our server. If the code is proprietary, use a provider your employer approves and a scoped, capped key reserved for tools like this one.

The open-source behind it

This tool's prompt is adapted from qodo-ai/qodo-cover (AGPL-3.0) and runs on the model you choose. To use the same capability from the command line or inside your own program, start with that project.

qodo-ai/qodo-cover

Also known as

  • ai unit test generator
  • generate unit tests
  • jest test generator
  • pytest generator
  • ai test case generator