# TestMagic: AI test generation for APIs

> TestMagic read a Swagger or OpenAPI spec, listed every endpoint and generated runnable API tests with AI. It later merged into Klarent.

URL: https://sanu.cc/products/testmagic
Author: Sanu Krishnan
Date: 2025-01-01
Updated: 2026-11-14
Tags: ai, testing, api
Website: https://www.producthunt.com/products/testmagic

## TL;DR

- An AI tool that took an API from its backend to a running test suite.
- It read a Swagger or OpenAPI spec, listed every endpoint, and generated functional, validation and boundary tests you could run straight away.
- In pilots with three companies, writing and running API tests went from about a month to two days.
- TestMagic merged into [Klarent](https://klarent.ai/) in 2025, and I joined Klarent with it.

TestMagic was an AI tool for API testing that I built on my own in 2025. You pointed it at a Swagger or OpenAPI spec, it listed every endpoint, and it generated functional, validation and boundary tests you could run straight away. In pilots, it turned about a month of test writing into two days.

> **TestMagic is no longer active.** It merged into [Klarent](https://klarent.ai/) in 2025, and I joined Klarent with it.

## Why did I build TestMagic?

Software was being built faster than ever, but testing hadn't kept pace. Writing and maintaining API tests was still slow and manual, and that's the part I wanted to fix: something like an extra QA engineer who never complains.

## How did TestMagic work?

[![Play video: Introducing TestMagic, the product demo](../../assets/projects/testmagic/video-demo.webp)](https://www.youtube.com/watch?v=IlsP9U2OKlk)

TestMagic took an API from zero to a running test suite in four steps.

1. **Connect.** Sign in with Google, then paste the API's base URL or its Swagger or OpenAPI link. TestMagic read the spec and listed every endpoint, with its parameters and responses.

![TestMagic after connecting the Swagger Petstore API: every endpoint listed on the left, with its parameters and responses](../../assets/projects/testmagic/endpoints.webp)

2. **Generate.** Pick an endpoint and let AI write the most relevant tests: functional tests for core behaviour, validation tests for parameter rules and data types, and boundary tests for min/max values and edge cases. You could also describe your own test.

![The Generate Tests dialog with functional, validation and boundary tests selected](../../assets/projects/testmagic/generate-tests.webp)

3. **Run and fix.** Run one test or all of them. Each test showed its code, its run time and full request and response logs. When a test failed, **Fix using AI** corrected it so you could run it again. You could also edit any test with AI or by hand, or ask for more.

![A failed validation test showing its code, the error and a Fix using AI button](../../assets/projects/testmagic/fix-with-ai.webp)

4. **Track.** An analytics page showed total tests, pass and fail counts, the success rate and recent runs.

![The Test Analytics page: five tests, four passing, one failing, an 80% success rate](../../assets/projects/testmagic/analytics.webp)

Each project could also have several environments, each with its own base URL, bearer token, headers and URL parameters. The frog with the magic wand was the mascot. It did not write any tests.

## My role

TestMagic was a solo project, and it started with conversations rather than code.

- I talked to companies I personally knew, to understand their pain points around testing.
- I spoke to experts in the domain and to software testers.
- One thing kept coming up: people were afraid of API testing. They saw it as a harder problem than it needed to be.

So I built a prototype, put it in front of people for early feedback, and iterated.

## Results

- **Piloted with three companies.**
- **About 30 days down to 2.** On average, writing the test scripts and running the testing process went from around a month to two days.
- **Cash-flow positive** while still in its early stages.

## What happened to TestMagic?

TestMagic was still early, and I was working out how to shape it. Then I had a long conversation with [Asheem](https://klarent.ai/authors/asheem-panakkat/), one of [Klarent](https://klarent.ai/)'s founders, and we decided it made more sense to build one product together than two. TestMagic merged into Klarent, and I joined the team, where I work on autonomous testing today.

For more about where TestMagic fits in my path, see the [About page](/about). For my first product, a very different kind of build, see [EBot](/products/ebot).

## Frequently asked questions

### What was TestMagic?

TestMagic was an AI tool for API testing that I built on my own in 2025. You pointed it at a Swagger or OpenAPI spec, and it generated tests you could run straight away.

### How did TestMagic generate API tests?

It read the spec and listed every endpoint with its parameters and responses. You picked an endpoint, and AI wrote functional, validation and boundary tests; when a test failed, Fix using AI corrected it.

### What results did TestMagic have?

It was piloted with three companies. On average, writing the test scripts and running the testing process went from around a month to two days, and it was cash-flow positive while still early.

### Is TestMagic still available?

No. TestMagic merged into [Klarent](https://klarent.ai/) in 2025, and I joined the Klarent team, where I work on autonomous testing today.
