BLOG · GUIDE ·

AI test generation on-premise for unit, integration and Playwright tests with a local LLM

Eurokommerz, Vienna, since 2006: Private AI/ML · IT Managed Services · Enterprise Training · AI Hardware & Software

IN BRIEF
  • A coding agent such as OpenCode, pointed at a model on your own GPU, writes unit and integration tests, runs them and repairs them (Claude Code works too, outside Anthropic's support); Playwright's Test Agents (since version 1.56) plan, generate and heal end-to-end tests the same way
  • Published results support a loop that runs and filters every test: Meta's TestGen-LLM kept only tests that built, passed reliably and raised coverage, and engineers accepted 73 per cent of its recommendations; in the TestGenEval benchmark, whole test files written by the best model, GPT-4o, reached 35.2 per cent average coverage
  • Mutation testing with PIT, Stryker or mutmut shows whether a generated test detects faults or only executes code, and Meta's ACH system uses mutants to steer test generation
  • By our users-per-card rule one NVIDIA RTX PRO 6000 Blackwell Workstation Edition or Max-Q holds Qwen3.6-35B-A3B in FP8 with 18 agent sessions of 128K tokens in memory; a server with RTX PRO 6000 Server Edition cards runs test generation for a department overnight
  • From us: the workstation or server alone, the setup of vLLM, a coding model, OpenCode and Playwright's agents alone, or both together, the system delivered with everything installed and configured

Supplied by Eurokommerz: NVIDIA RTX PRO 6000 Blackwell  Check price and availability →

Tests written by a model on your own server

A QA or development team can generate unit, integration and end-to-end tests with an open model on its own GPU, so the source code goes only to the company's own model server. A coding agent writes a test, runs it, reads the failure and fixes it; Playwright's Test Agents do the same for browser tests, and mutation testing then checks whether the new tests catch faults. One NVIDIA RTX PRO 6000 Blackwell Workstation Edition or Max-Q with 96 GB serves a team, and a server with RTX PRO 6000 Server Edition cards runs the same jobs for a whole department in the nightly pipeline.

This guide is for QA leads, test automation engineers and heads of development. It summarises what research has measured, which tools write which kind of test, how to check the output, and which hardware fits. How the agents connect to a local model is set out in our guide to Claude Code with a local model; embedded C and MISRA have their own guide, local AI for embedded C unit tests, and review bots for merge requests are covered in self-hosted AI code review.

What research has measured on LLM-written tests

STUDYSETTINGRESULT
TestGen-LLM, Meta, 2024extends existing tests, Instagram75 % build, 57 % pass reliably, 25 % raise coverage
TestGen-LLM test-a-thonsInstagram and Facebook11.5 % of classes improved, 73 % of proposals accepted
ACH, Meta, 2025mutants for privacy faults, Kotlin9,095 mutants, 571 tests, 73 % accepted
CoverUp, 2024–2025Python modules, coverage-guided loopmedian 80 % line and branch coverage, CodaMosa 47 %
TestGenEval, 2024–2025whole test files, 11 Python projectsbest model, GPT-4o, 35.2 % average coverage

arXiv abstracts of 2402.09171 (14 February 2024), 2501.12862 (22 January 2025), 2403.16218 (v4, 9 May 2025) and 2410.00752 (v2, 18 March 2025), read 30 October 2026. Only TestGenEval names a model in its abstract; none of the studies reports results on RTX PRO hardware.

Meta's TestGen-LLM paper, "Automated Unit Test Improvement using Large Language Models at Meta", describes a tool that improves existing human-written tests and checks each candidate against filters before a person sees it. In its Instagram evaluation, 75 per cent of the generated test cases built, 57 per cent passed reliably and 25 per cent increased coverage. By those figures, three in four generated tests added no coverage, and the filters removed them before review.

The follow-up paper "Mutation-Guided LLM-based Test Generation at Meta" turns the order round. Its ACH system first generates a few mutants, simulated faults tied to one concern such as privacy, and then asks the model for tests that catch them. Across 10,795 Android Kotlin classes on seven platforms it produced 9,095 mutants and 571 privacy-hardening tests, and engineers at Messenger and WhatsApp test-a-thons accepted 73 per cent of its tests.

Two academic benchmarks give very different numbers. CoverUp, a coverage-guided loop for Python, reached a median per-module line and branch coverage of 80 per cent against 47 per cent for CodaMosa. TestGenEval asked models to write complete test files for 1,210 code files from 11 Python repositories, and the best model in the paper, GPT-4o, reached "an average coverage of only 35.2%". The two studies use different projects, models and tasks, so the figures cannot be compared directly. CoverUp's authors credit their result both to the model and to the way coverage analysis, code context and feedback are combined over several rounds, which is the same principle as Meta's filters.

Tools for unit, integration and end-to-end tests

TOOLLICENCEWRITESSTATUS, OCTOBER 2026
OpenCodeMITunit and integration tests, any languageactively developed
Claude CodeAnthropic's termsunit and integration tests, any languagelocal models outside Anthropic's support
Playwright Test AgentsApache 2.0browser end-to-end testssince Playwright 1.56, current 1.64
Qodo CoverAGPL-3.0unit tests that raise coverageno longer maintained

Playwright documentation and release notes, the Qodo Cover repository and the Playwright repository, read 30 October 2026; OpenCode and Claude Code as verified in our Claude Code guide on 30 October 2026; Anthropic's gateway documentation re-read on 30 October 2026.

Coding agents for unit and integration tests. OpenCode and Claude Code read the repository, write a test file, run the test command in the terminal and repair what fails. OpenCode connects to an OpenAI-compatible endpoint such as vLLM or Ollama. Claude Code reaches a local model through the Anthropic-format endpoint that both serve, but Anthropic's documentation states that it "doesn't support routing Claude Code to non-Claude models through any gateway", so that setup runs outside its support. Give the agent a project instruction file with the test framework, the naming rules, the fixtures to reuse and the command that measures coverage.

Playwright Test Agents for end-to-end tests. Playwright 1.56 introduced "three custom agent definitions designed to guide LLMs": the planner explores the application and writes a Markdown test plan, the generator turns the plan into Playwright test files and checks selectors and assertions against the running application, and the healer runs the suite and repairs failing tests. npx playwright init-agents writes the definitions into the repository, with loops for VS Code, Claude Code and OpenCode in the 1.56 release notes; the documentation says "use your AI tool of choice" and asks for the definitions to be regenerated whenever Playwright is updated. Plans go to specs/, tests to tests/, starting from a seed test that provides a ready-to-use page context. The documentation notes that the healer can also leave a test skipped if it judges the functionality broken, so a reviewer looks at every skip. Since version 1.62 Playwright also bundles the Playwright MCP server.

Qodo Cover, formerly a popular open tool for coverage-raising unit tests, has stated since 15 June 2025: "This repository is no longer maintained. Please fork it if you wish to continue development or use it in your own projects." We do not install it.

You can order the workstation or server alone, the setup of vLLM, a coding model, OpenCode and Playwright's agents alone, or both together: the system delivered with everything installed and configured; write to us and we suggest the best solution for your tasks and budget.

Mutation testing as the quality gate

Coverage shows which lines a test executes. Whether the test would notice a bug is a separate question: a generated test that calls a function and asserts nothing raises coverage and catches nothing. Mutation testing measures that second property. In PIT's words, "Faults (or mutations) are automatically seeded into your code, then your tests are run. If your tests fail then the mutation is killed, if your tests pass then the mutation lived." A surviving mutant points to an assertion the tests lack.

TOOLLANGUAGESLICENCE
PITJava and the JVMApache 2.0
StrykerJavaScript and TypeScript, C#, ScalaApache 2.0
mutmutPythonBSD-3-Clause

pitest.org and the PIT, Stryker and mutmut repositories, read 30 October 2026. PIT works with Ant, Maven and Gradle; mutmut needs a system with fork support, so it runs on Windows only under WSL.

A gate for generated tests follows Meta's filters, with mutants added:

  1. Builds. The test compiles and its imports resolve.
  2. Passes repeatedly. It passes several runs in a row, which removes flaky tests that depend on timing or order.
  3. Adds coverage. Coverage on the changed code rises against the existing suite.
  4. Kills mutants. The mutation score on the touched code goes up, or surviving mutants are fed back to the agent as the next task, as ACH does.
  5. Passes review. A developer reads the assertions before merge. A test that freezes a current bug into an expected value passes every automatic check.

Mutation testing runs the tests again for every mutant, on the processors of your build machines and not on the GPU, so restrict it to the changed files in each merge request and run the full analysis at night.

Which model, and how much context

A test-writing agent sends the instructions, the code under test, existing tests and every test run's output on each step, so it needs a model with reliable tool calling and a context of at least 64,000 tokens, the minimum Ollama asks for coding agents. We size at 128K tokens, as in our Claude Code guide.

The open models that fit one or two workstation cards are Qwen3.6-35B-A3B (35B total, 3B active, SWE-bench Verified 73.4 by Qwen), the dense Qwen3.8-27B (SWE-bench Pro 61.7 in the Claude Code harness, by Qwen) and Qwen3-Coder-Next (80B total, 3B active), all under Apache 2.0. Their cards report repository-repair and terminal benchmarks; neither the Qwen3.6-35B-A3B card nor the Qwen3.8-27B card reports a test-generation benchmark. Run a pilot on your own code instead: pick 20 classes without tests, let the agent work, and count the tests that pass the gate above. Qwen3.6-35B-A3B computes about 3B of its 35B parameters per token, so it reads only a fraction of the weights the dense Qwen3.8-27B reads and, by our arithmetic, answers several times faster, which matters when an agent iterates dozens of times per file.

GPUs from one developer to the nightly pipeline

Interactive work needs fast answers for each developer; nightly generation needs throughput. Our users-per-card rule takes 90 per cent of the memory the driver reports, less 3 GiB per card, less the weights, as explained in our guide to how many users one RTX PRO 6000 serves.

TIERCONFIGURATIONUSABLE BY OUR RULEMODELSESSIONS OF 128K
Entry1 × RTX PRO 4500, 32 GB25.7 GiBQwen3.6-35B-A3B NVFP41 (2)
Entry, 72 GB1 × RTX PRO 5000, 72 GB61.5 GiBQwen3.6-35B-A3B FP810 (20)
Mid1–2 × RTX PRO 6000 Workstation Edition or Max-Q83.0 or 166.1 GiB35B-A3B FP8 on one card, Coder-Next as a pair on two18 (36), 29 (57)
Largeserver, 4 or 8 × RTX PRO 6000 Server Edition332.2 or 664.3 GiBCoder-Next, two or four pairs58 (114), 116 (228)

sessions held in memory by our users-per-card rule with a 16-bit cache (FP8 cache in brackets), from our Claude Code guide of 30 October 2026; for interactive work that guide plans fewer sessions at 50 tokens per second, for example 11 (23) on one RTX PRO 6000 Workstation Edition or Max-Q, an upper bound by our estimate.

Entry. One RTX PRO 4500 Blackwell (32 GB) serves one developer who writes tests with an agent. The RTX PRO 5000 Blackwell with 72 GB serves a small QA team.

Mid. One RTX PRO 6000 Workstation Edition or Max-Q (96 GB) holds 18 sessions of the 35B-A3B model and suits a team of about ten; 11 of them run at the planned 50 tokens per second, an upper bound by our estimate for this mixture-of-experts model. For those who prefer the dense model, the same card holds Qwen3.8-27B in FP8 with 6 sessions of 128K in memory, 13 with an FP8 cache, at a ceiling of about 63 tokens per second for one request by our estimate. Two cards run Qwen3-Coder-Next as a tensor-parallel pair. Two Workstation Edition cards at 600 W each are the realistic maximum for that edition; three or four Max-Q cards belong only in a chassis built for them with strong directed airflow.

Large. For nightly generation across many repositories a rack server with RTX PRO 6000 Server Edition cards takes over. The nearest published throughput figure is NVIDIA's TensorRT-LLM result for Qwen3-30B-A3B in FP4 on one RTX PRO 6000 Server Edition: 374 output tokens per second with 32,768-token prompts and 1,024-token answers at maximum offline throughput. By our arithmetic that is 374 × 60 ÷ 1,024, about 22 calls a minute. If an agent needs 20 calls to finish the tests for one module, an assumption for illustration, one card completes at most about 66 modules an hour, an upper bound by our estimate. Count the calls per module in your pilot. Four cards at 600 W with two AMD EPYC 9355 processors draw about 3.4 kW by our estimate. Our guide to a server for coding agents sizes the shared case.

Send us the number of developers, the languages and test frameworks, and how many repositories the nightly run should cover; we size the workstation or server and the model for that load.

Test generation in the CI pipeline

The GPU machine serves the model; the tests run where they always run. A CI job checks out the branch, starts the agent with the project's instruction file, lets it write and run tests in the job's container, applies the gate and opens a merge request with the tests that passed. Browser tests need browsers and the application under test in that container, which costs processor time and memory on the runners, not on the GPU server. Our guide to GPU CI runners covers runners that need a GPU themselves.

Four settings reduce the risk. Run the agent in a container without production credentials, because it executes the code it writes. Give each pipeline its own key on an LLM gateway with keys and logging, since vLLM's own --api-key protects only some paths and manages no users. Set the context the server was started with in the agent's configuration, so long test runs are compacted before the server rejects a request. And set "share": "disabled" in OpenCode's configuration, because its /share command uploads the conversation, which can contain code, to opencode.ai.

FAQ

Can I generate unit tests with AI on-premise without sending code to the cloud?
Yes. A coding agent such as OpenCode, pointed at vLLM or Ollama on your own GPU, writes and runs unit and integration tests in your repository, and the code goes only to your model server. Claude Code can also use a local endpoint, outside Anthropic's support.
Which open-source tools generate tests with AI?
OpenCode (MIT) writes tests in any language as a general coding agent, and Playwright's Test Agents (Apache 2.0, since version 1.56) plan, generate and heal browser end-to-end tests with the model of your choice. Qodo Cover (AGPL-3.0) has not been maintained since June 2025. PIT, Stryker and mutmut then check the tests with mutation testing.
How good are AI-generated unit tests?
In Meta's TestGen-LLM evaluation, 75 per cent of generated tests built, 57 per cent passed reliably and 25 per cent raised coverage; after filtering, engineers accepted 73 per cent of its proposals. In the TestGenEval benchmark, whole test files written by GPT-4o, the best model in the study, reached 35.2 per cent average coverage. Meta's results come from a loop that runs and filters every candidate, and that loop is the part to copy.
How do I check AI-generated tests?
Keep only tests that build, pass several runs in a row, raise coverage and kill mutants, then let a developer read the assertions. Mutation testing with PIT for Java, Stryker for JavaScript, TypeScript and C#, or mutmut for Python shows whether a test detects a seeded fault.
Can Playwright generate tests with a local LLM?
Playwright's Test Agents are instructions and MCP tools for an agent loop, and Playwright's documentation says to use the AI tool of your choice. Its 1.56 release notes list loops for VS Code, Claude Code and OpenCode, and OpenCode connects to a local OpenAI-compatible endpoint such as vLLM or Ollama.
What GPU do I need for AI test generation?
For one developer, a 32 GB RTX PRO 4500 holds Qwen3.6-35B-A3B in 4-bit with one 128K session by our users-per-card rule. One 96 GB RTX PRO 6000 Workstation Edition or Max-Q holds 18 sessions in FP8, and a server with RTX PRO 6000 Server Edition cards carries nightly runs for a department.
Where can I buy a server for AI test generation, and what does it cost?
From us: we supply RTX PRO workstations and servers with RTX PRO 6000 Server Edition across the EU. We quote the exact configuration in writing; the price depends on the cards, the card count, memory, storage and whether we set up the software.

We supply workstations and servers for AI test generation alone, set up vLLM, a coding model, OpenCode and Playwright's agents alone, or deliver both together. Describe your task in a few sentences and our team will help. We reply within one business day.

Talk to an expert
Talk to an expert

We reply within one business day

By sending this form you agree that we process your details to answer your enquiry; see our privacy policy.

request@eurokommerz.at
Jordangasse 7, 1010 Vienna