Documentation
3TG turns the business rules you write in plain Markdown tables into a complete, deterministic test suite for TypeScript and React — generated right inside your editor. Your spec is the source of truth, not a language model guessing your logic.
Introduction
3TG (3rd Generation Testing) is a Testing-as-a-Service platform that generates executable unit and integration tests from human-written specifications. Instead of hand-writing boilerplate — describe, it, mocks, assertion arrays — you describe the expected behavior in a Markdown table, and 3TG produces clean, typed test files mapped one-to-one to your rules.
Three ideas make it different from a standard AI code assistant:
- Deterministic. The same spec always produces the same tests. No hallucinated assertions.
- Human-in-the-loop. You hold the final say — AI only drafts candidate inputs and their expected results; nothing becomes a test until you approve it.
- Local-first. Specs live in your repo as plain .3tg.md files and version with your code.
How it works
The loop is the same everywhere — in VS Code, in IntelliJ, or driven by an AI agent over MCP:
- 1Point at a file. Open any TypeScript function or React functional component.
- 2Write a spec. Describe inputs and expected outputs in a Markdown table inside a .3tg.md file.
- 3
Generate & merge. 3TG writes a typed .test.ts / .test.tsx next to your source by default, or anywhere you point it. Review, commit, ship.
Installation
Pick whichever entry point fits your workflow. All three talk to the same engine.
This is your client ID — add it to the 3TG VS Code / IntelliJ extension settings (or when 3TG MCP asks for it) to activate it. We’ve emailed it to you too.
VS Code extension
Install 3TG — TaaS from the Visual Studio Marketplace, then open the command palette and run 3TG: Generate tests.
Open in VS Code MarketplaceIntelliJ / JetBrains
Search for 3TG — TaaS in the JetBrains Marketplace (Settings → Plugins), or install from the page below. Works across IntelliJ IDEA, WebStorm, and the rest of the JetBrains family.
Open in JetBrains MarketplaceMCP server
Add the 3TG server to any MCP-capable agent. Paste this into your client's .mcp.json:
{ "mcpServers": { "3tg": { "type": "http", "url": "https://mcp.3tg.dev/mcp" } } }
Prefer the CLI? Run claude mcp add --transport http 3tg https://mcp.3tg.dev/mcp.
Quick start
From an empty file to a green suite in under five minutes.
- 01Create a file named authService.3tg.md next to authService.ts.
- 02Write a heading for the unit under test and a table of cases (see below).
- 03Run 3TG: Generate tests — or ask your MCP agent to "generate tests from the spec".
- 04Run your suite: npx vitest or npx jest.
The .3tg.md format
A spec file is ordinary Markdown with a small set of conventions:
- A top-level heading (# name) names the function or component under test. React functional components are marked with a [react] at the end of the signature line.
- An optional prose line documents the input.
- A table where the first column is the test name, the middle columns are inputs/props, and the last column(s) are the expected output or thrown error.
- Optional scenario() code blocks extend a test case with custom TypeScript or JavaScript — extra assertions or interactions (clicks, submits).
Testing functions
A pure function maps inputs to an output or a thrown error. Each row is one test case.
# validateAge(age: number) Reject ages below zero. | test case | age | validateAge | | --------------------- | --- | ------------------- | | "reject negative age" | -1 | throw "Invalid age" | | "pass 18" | 18 | undefined |
Generates (Vitest):
import { describe, it, expect } from 'vitest' import { validateAge } from './validateAge' describe('validateAge', () => { it('reject negative age', () => { expect(() => validateAge(-1)).toThrow('Invalid age') }) it('pass 18', () => { expect(validateAge(18)).toBeUndefined() }) })
Testing React
For a React functional component, the middle columns are props, and the last two columns map to a React Testing Library query (screen.) and its matcher (.to, blank = toBeInTheDocument). 3TG generates React Testing Library tests. Class components are not supported — 3TG targets functional components and hooks.
# CartSummary(props: Props) [react] Render the totals for the given props. | scenario | items | subtotal | screen. | .to | | -------- | ----- | -------- | -------------------- | --- | | totals | 3 | 60 | getByText('3 items') | |
Events & interactions
A scenario can only have one input, so additional assertions and user interactions go in a scenario() block — raw TypeScript or JavaScript injected into that test case. Callback props are auto-mocked as spies, and render, screen, and fireEvent are in scope.
Extend the totals scenario in CartSummary.3tg.md:
```typescript scenario(totals) expect(screen.getByText('€60.00')).toBeInTheDocument() fireEvent.click(screen.getByRole('button')) expect(onCheckout).toHaveBeenCalledOnce() ```
3TG merges it into the one generated test:
it('totals', () => { const onCheckout = vi.fn() render(<CartSummary items={3} subtotal={60} onCheckout={onCheckout} />) expect(screen.getByText('3 items')).toBeInTheDocument() expect(screen.getByText('€60.00')).toBeInTheDocument() fireEvent.click(screen.getByRole('button')) expect(onCheckout).toHaveBeenCalledOnce() })
Video tutorials
Short, hands-on walkthroughs of the main 3TG workflows. More on youtube.com/@codingcreedtechnologies.
Supported frameworks
3TG emits idiomatic tests for the major TypeScript runners. Switch the target using a config setting.
Default runner. describe / it / expect, jest.fn() spies.
Alternative runner. describe / it / expect, vi.fn() spies.
Fully typed output for functions, types, and modules.
Functional components and hooks — render + interaction tests via React Testing Library.
Using MCP
The 3TG MCP server is the most powerful way to drive 3TG: any MCP-capable agent can read your spec and generate tests conversationally. Once the server is in your .mcp.json (see Installation), it works with Claude Code, Cursor, Windsurf, Codex, GitHub Copilot, Continue, Cline, and any other client that speaks MCP.
Typical prompts:
- "Generate tests from authService.3tg.md."
- "Propose test cases for this spec, then regenerate."
- "Convert these requirements into a 3TG spec table."
AI & Gemini (optional)
The IDE extensions run fully deterministic with no AI — the generated tests are a direct function of your spec table. AI is strictly optional:
- Add your own Gemini API key in the extension to get optional edge-case suggestions — you still approve every row.
- The MCP path is the AI-agent route: the agent reads your spec and calls 3TG, but the spec remains the source of truth.
Limits & plans
Every plan ships the full product — the IDE extensions, MCP, mocks, and schema scaffolding. The only thing that changes is how many tests you can generate per month.
| Plan | Price | Tests / month |
|---|---|---|
| Free | €0 | 100 |
| Essential | €29 | 2,000 |
| Growth | €79 | 10,000 |
| Ultimate | €299 | 50,000 |
Paid plans activate from the dashboard once you're on the Free plan. Need a sprint burst? One-time boosters from €19 lift your limit for 30 days. See pricing.
Configuration
The role of configuration files in 3TG
Configuration files customize and control how test, mock and functional-requirement files are generated. They let you tailor 3TG to your project's specific needs, keeping generated output aligned with your established coding standards and testing practices.
Configuration files apply to the VS Code and IntelliJ extensions, and to the MCP server — which reads them from a .3tg folder in your project root.
There are two types of configuration file:
Provided explicitly. Point 3TG at a custom configuration file for precise control over the test-generation process.
Applied automatically when a file with the same name as the source — plus a .3tg.json extension — sits beside it.
For example, if the source file is utils.ts, its implicit configuration file is utils.3tg.json:
{ "testing-framework": "vitest" }
This dual approach keeps things flexible — provide explicit configurations for specific use cases, or rely on implicit configurations for seamless, automated behavior tailored to individual files.
Configuration options
Every option 3TG understands is listed below. The exact rules, accepted values and defaults for each option are available to signed-in users.
options. Selecting an option reveals its rules and examples for signed-in users.
FAQ
Isn't this just AI slop?
No. Generation is deterministic and driven by your Markdown table, not a model improvising. AI, if enabled at all, only proposes candidate inputs and expected results you explicitly approve.
Do my specs leave my machine?
Yes — to generate tests, your spec is sent to 3TG's service over an encrypted connection, then discarded as soon as generation finishes; it's never stored. The generated test files are written back into your repo, where your plain .3tg.md specs live and version alongside your code like any other source file.
Will tests break when I refactor?
Assertions evaluate your declared input-to-output matrix, not internal function names. Rename and restructure freely — the suite keeps passing as long as behavior holds.
Does it support React class components?
3TG targets functional components and hooks. Class components aren't supported.
Support
Stuck, or want a feature? We read every message.