LOCAL FILES. CLEAR RESULTS.

Test case generator

Generate a test-case matrix from code or requirements — normal, boundary and error paths — and get a runnable skeleton for Vitest, Jest, Pytest or Go test whose case count is verified against the matrix.

About this tool

Tests get skipped because writing the case list is the slow part, and the cases that get skipped are always the boundary and error paths. This generator measures your code structure locally — function names and branch counts — and builds a case matrix against it: normal, boundary and error cases, each with given, input and expected.

The matrix is then rendered into a runnable skeleton for Vitest, Jest, Pytest or Go test, one test per case with the setup written in as comments. Before you download, the skeleton is counted locally against the matrix — if a case went missing in rendering, the tool says so instead of handing you a partial file.

How to use Test case generator

  1. Add your provider API key in the key panel.
  2. Paste the function or module code (or a requirements paragraph) and pick the test framework.
  3. The code structure is measured locally; cases are generated against that structure — normal, boundary and error paths.
  4. Download the case matrix and the runnable test skeleton; the two are count-checked against each other.

Keep the original files and inspect the exported result before publishing or sharing it.

Frequently asked questions

How are the cases tied to my code?

Function names and branch counts are measured locally first and handed to the model as the structure to cover, so cases target real functions instead of generic advice.

Is the skeleton runnable?

It is a valid test file for the chosen framework with one test per case, the given/input/expected written in as comments, and a TODO marker where you wire up the call and assertion.

How do I know no case was lost?

The skeleton is counted locally after generation; if the count does not match the case matrix, the tool says so instead of handing you a partial file.

Where does my code go?

Only to the AI provider behind your own key, directly from your browser.

Related tools