Toolvito

Processed online by Toolvito

AI Test Case Generator

Paste your code. Get test cases with inputs and expected results, as a pytest or unittest file for Python, or as plain test cases for other languages.

Choose what to do

Task
Write test cases with AI

The tests import your functions from it.

Your code is sent to the Toolvito server and read there; it is never run. The AI tests are written by a language model that runs on the server itself; nothing is sent to another company. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How it works

  1. Paste the code and choose pytest or unittest (Python), or plain, Jest or JUnit test cases.
  2. Press Write the tests. A language model that runs on the Toolvito server writes the cases.
  3. For Python, code checks every case: the function exists, the number of arguments fits its signature, the arguments and the expected value are plain Python values (no code), and an exception is one Python has or your code raises. The test file is then written by code and checked to parse.
  4. Run the tests. The expected values are the model’s reading of your code and were not run here, so a failing test can mean a wrong expectation or a real bug.

A skeleton without AI

Make a test skeleton writes a pytest or unittest file from your function signatures: inputs chosen by type hint (0, 1 and −1 for numbers, an empty and a short string …), one value changed at a time, and a ... where you write the expected value.

Related tools