Microsoft has open sourced code-testing-generator, a polyglot agent that writes unit assessments after which proves they work. It ships within the dotnet-test plugin contained in the MIT-licensed dotnet/expertise repository.
The agent targets a niche that coding assistants often depart open. A immediate like ‘generate unit assessments’ doesn’t say which framework, file location or assertions to make use of. code-testing-generator settles these choices by studying the repository earlier than it writes something. It then plans, writes, runs and checks the assessments it produces. On Microsoft’s inside 152-task benchmark, it accomplished 140 duties towards 120 for inventory GitHub Copilot. Each setups used the identical mannequin and prompts.
Is it deployable
Sure. It’s an agent definition together with expertise, not a hosted service, so it runs inside your current coding agent and code stays native.
- Firm stage: viable from solo maintainers upward. Startups and mid-market groups acquire most, as a result of the agent provides repository analysis a small workforce has no time to encode. Enterprises can fork the language steerage to match inside frameworks.
- Industries: regulated or audit-heavy software program estates — monetary companies, healthcare, insurance coverage, public sector — plus platform groups paying down legacy take a look at debt.
- Purposes: backfilling assessments on untested modules, producing assessments for a pull-request diff, elevating protection earlier than a launch gate, and standardising conventions throughout polyglot monorepos.
What the agent truly does
It coordinates work via a Analysis-Plan-Implement (RPI) pipeline. It searches the repository for code needing assessments, detects the language and take a look at framework, reads current assessments for conventions, and finds the true construct and take a look at instructions. That final step targets a selected failure: a take a look at undertaking that builds domestically however by no means runs in CI as a result of nothing registered it.
The agent then picks one in all three methods. Direct writes and validates assessments instantly. Single go runs one cycle. Iterative repeats it for big scopes or protection targets. It by no means modifies manufacturing code, and avoids assessments that decision exterior URLs, bind ports or depend upon timing.
The verification gate
Earlier than reporting completion, the agent runs 5 checks. It causes about small code adjustments that ought to make the assessments fail, a light-weight type of mutation testing. It appears to be like for weak or lacking assertions. It maps each requested state of affairs to a take a look at. It builds the total workspace and runs the total suite. It confirms the repository’s personal take a look at command discovers the brand new assessments.
Benchmark outcomes
On Microsoft’s inside benchmark of 152 duties from actual repositories, the agent accomplished 140 (92.1%) versus 120 (78.9%) for inventory GitHub Copilot on the identical mannequin and prompts (63% fewer failures).
The acquire is concentrated. On 89 imprecise prompts, the agent resolved 79 (88.8%) towards 59 (66.3%), reducing failures from 30 to 10. On 63 detailed prompts, each scored 61 (96.8%). On 15 duties concentrating on a selected diff, the agent handed all 15 and inventory Copilot handed none.
Notably, the agent generated 2.3% fewer assessments (6,963 vs 7,129) at successfully an identical line protection (72.4% vs 72.2%). Common activity time was 359 seconds towards 380. Token use per accomplished activity was 3.2% increased.
On 45 .NET duties, Claude Opus 4.8 reached 43/45 with the agent versus 35/45 inventory; GPT-5.5 reached 41/45 versus 36/45. On the more durable exterior SWE Atlas benchmark, completion was 16/44 versus 12/44.
Explainer: how the agent turns one immediate into verified assessments
/* 4. benchmark */
var SETS=[
[‘All 152 tasks’,[[‘Tasks completed’,140,120,152]],’92.1% versus 78.9% with the identical mannequin u2014 63% fewer failures. The agent additionally generated 2.3% fewer assessments at successfully the identical protection.’],
[‘Vague prompts’,[[‘Resolved (89 tasks)’,79,59,89]],’88.8% versus 66.3%. Failures fell from 30 to 10 u2014 67% fewer u2014 and all 20 web good points got here from this group.’],
[‘Detailed prompts’,[[‘Resolved (63 tasks)’,61,61,63]],’96.8% for each. When the developer already provides the selections, the workflow provides nothing.’],
[‘Diff-targeted’,[[‘Resolved (15 tasks)’,15,0,15]],’The agent handed all 15 duties that requested for assessments masking a selected code change. Inventory Copilot handed none.’],
[‘SWE Atlas’,[[‘Tasks completed (44)’,16,12,44],[‘Tests catching injected bugs’,360,316,400]],’A more durable exterior benchmark. Completion is way decrease on either side u2014 36.4% versus 27.3%.’]
];
var bi=0;
$(‘#dtagBenchTabs’).innerHTML=SETS.map(perform(s,i){
return ‘‘}).be a part of(”);
perform drawBench(){
var set=SETS[bi];
$$(‘#dtagBenchTabs .chip’).forEach(perform(c){c.setAttribute(‘aria-pressed’,String(+c.dataset.b===bi))});
$(‘#dtagBench’).innerHTML=set[1].map(perform(r){
return ‘
‘+r[0]+’‘+r[1]+’ vs ‘+r[2]+’
‘+
”+
‘
‘;
}).be a part of(”);
$(‘#dtagBenchNote’).textContent=set[2];
setTimeout(perform(){$$(‘#dtagBench .observe i’).forEach(perform(i){i.fashion.width=i.dataset.w+’%’});resize()},60);
}
$$(‘#dtagBenchTabs .chip’).forEach(perform(c){c.addEventListener(‘click on’,perform(){bi=+c.dataset.b;drawBench()})});
window.addEventListener(‘load’,resize);setTimeout(resize,300);setTimeout(resize,900);
})();









