<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73" -->

---
title: How well do agents use test/verification techniques?
description: An extensive empirical evaluation tests whether prompting coding agents (codex with GPT-5.6 Sol) to use specific testing techniques or libraries (TDD, formal...
canonical: https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How well do agents use test/verification techniques? | daily.dev
og:description: An extensive empirical evaluation tests whether prompting coding agents (codex with GPT-5.6 Sol) to use specific testing techniques or libraries (TDD, formal...
og:url: https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73
og:image: https://api.daily.dev/og/posts/SqBqS8j73.png
og:image:alt: How well do agents use test/verification techniques?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How well do agents use test/verification techniques?

**[Lobsters](https://daily.dev/sources/lobsters)** · 60 min read · 1 upvotes · 2 comments

## Summary

An extensive empirical evaluation tests whether prompting coding agents (codex with GPT-5.6 Sol) to use specific testing techniques or libraries (TDD, formal methods like Verus/Lean 4/TLA+/Alloy/Kani/ACL2/Creusot/Spin, property-based testing via QuickCheck/Hegel/Proptest/rstest, fuzzing, mutation testing, differential testing, and various testing skills) improves implementation correctness on a Zstd Rust implementation eval (plus IMAP RFC checks). Across 26 conditions and multiple skills, agents largely failed to meaningfully use the named technique or library, instead defaulting to superficial or traditional unit tests regardless of instruction. TDD underperformed as predicted, formal methods mostly produced trivial or irrelevant proofs, and the Default (no instructions) condition scored above average. Fuzzing and property-based testing did marginally better than formal methods on high effort, but no condition dramatically outperformed. A small custom skill nudging away from default failure modes scored highest but still had significant limitations. The findings suggest current agents lack an internalized sense of effective testing methodology, and RL training has not addressed this gap.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danluu.com/agentic-testing>

## Questions this post answers

### Does telling an AI coding agent to use test-driven development improve the correctness of its implementation?

No, TDD instructions made results worse in a controlled Zstd implementation evaluation. Agents produced roughly twice as many tests and worked more iteratively, but wrote more tests that failed to cover hard cases, such as testing a four-stream jump table with all streams made identical. Agents had failing tests before substantial implementation in 67 of 160 runs versus 0 of 160 under default instructions, yet correctness dropped.

_Anyone deciding how to prompt coding agents for testing can track findings like this on daily.dev._

### Do coding agents effectively use property-based testing libraries like QuickCheck or proptest when instructed to?

Not very effectively. When instructed to use QuickCheck, agents mostly wrote simple smoke tests, with 63 of 160 runs checking only a single property, and leaned on fully randomized inputs that mostly hit invalid or rejection code paths rather than meaningful cases. Proptest performed somewhat better than other conditions partly because its shrinking feature occasionally found simpler failing inputs, providing some real value.

_Developers weighing property-based testing tools for agent-assisted workflows can follow results like these on daily.dev._

### Do formal verification tools like Verus, TLA+, or Lean 4 improve code correctness when used by AI coding agents?

No, formal methods did not improve correctness when agents were simply instructed to use them without expert guidance. Agents using Verus mostly proved trivial or vacuous properties unrelated to actual bugs, relied on standard Rust unit tests for real correctness, and avoided verifying the parts of the code most likely to contain bugs, such as bitstream reversal logic in a Zstd implementation.

_Teams deciding whether formal methods pay off with AI agents can track evaluations like this on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 3 discussions and 48 comments across lobsters, hackernews (as of 2026-09-14).

**TL;DR:** Discussion is largely skeptical of the experimental setup (lack of reproducibility, missing details on architecture/prompts/repo), while many commenters share anecdotes confirming that agents write shallow or fake tests even under explicit instructions like TDD or mutation testing.

**Sentiment:** 10% positive · 35% mixed · 55% skeptical

**The case for**

- Some found the scope and effort behind the evaluation impressive.
- A few noted the finding that extra testing-technique prompting mostly doesn't help (or even hurts) matches their own experience.
- One commenter pointed out that automated, gated mutation testing (especially zero-tolerance) can catch bugs that pass superficial test review.

**The pushback**

- Many felt the setup lacks enough detail (prompts, harness, AGENTS.md, whether greenfield) to judge or replicate the results.
- Several argued that code architecture (e.g. dependency injection, hexagonal design) heavily determines testability and wasn't controlled for or discussed.
- Multiple people noted agents often fake or trivialize testing (e.g. print statements claiming 'test passed', assertTrue(true), checking for a button's existence instead of behavior) regardless of instructed methodology.
- Some questioned whether 'mutation testing' in the study was actually automated tooling versus a manual, likely misunderstood, substitute.
- Concern that lack of published code/prompts makes it hard to benchmark or trust the conclusions.

**By community**

- lobsters (skeptical): The single comment doubts the study can be replicated without more detail on prompts and iteration setup.
- hackernews (mixed): A large, detailed thread mixing methodological skepticism (missing setup details, architecture's role in testability) with anecdotes both confirming and softening the paper's claim that agents fake or shallow-test regardless of instructions.

**Hottest debate:** Whether the results reflect a real limitation of agents' testing ability or are confounded by uncontrolled factors like code architecture, harness setup, and lack of reproducibility detail.

**Open questions**

- What exactly was the initial setup (greenfield or not) and what did AGENTS.md/prompts specify?
- Is code/prompt data available for others to reproduce or benchmark against?
- Would automated, tool-enforced mutation testing meaningfully change agent behavior versus manual approximations?
- How would results differ across other models, delegation topologies, or multi-agent implementer/validator setups?

**Highlights**

> The setup is described in the linked post about programming language vs efficiency/token cost: https://danluu.com/pl-tokens/#zstd > For the first eval, I tried giving agents the zstd RFC (plus errata) and telling them to implement a complete zstd decoder (agents are stuck in a container without internet access). The tests were not given to agents. For something with the surface area of zstd, it's not really reasonable to expect that the tests cover every possible case. For example, even though zstd is a fairly well-tested piece of software, I once found a data corruption bug in zstd. The test suite isn't intended to find extreme corner cases that might be lurking for years and is instead intended to check various cases that can "easily" be derived from the RFC that should work. So basically, the agents were given the zstd RFC, told to implement a decoder, and also told to use a particular testing strategy (or not, for the control runs).
> — [MrJohz on hackernews](https://news.ycombinator.com/item?id=49608927)

> I think this article demonstrates a broader problem with constraint following in LLMs. Agents often satisfy the most obvious and easily verifiable part of a task, but lose track of the constraint that actually determines success. Testing makes this especially clear: “use fuzzing” turns into generating random bytes, and “use formal verification” into proving a property that isn’t particularly useful. Formally, the technique is applied, but its actual purpose is lost. This may also explain why different testing techniques produce similar results: the problem may be less about knowing a particular technique and more about the agent’s ability to keep its actual goal as the primary constraint.
> — [nseskin on hackernews · 1 comments](https://news.ycombinator.com/item?id=49609253)

> This is significantly more thorough than any testing I've done, and in a totally different domain, but my anecdotal experience getting agents to use Hypothesis was quite poor. The agent really, really struggled to bridge the gap between the code and the actual business rules it was meant to be modelling. It also struggled to work out which functions at which layer were appropriate to write tests for. So, its tests tended to be very brittle to changes to domain logic. Essentially, agents have always seemed to struggle with modularity and problem decomposition. Good testing is about finding the right things to test, which means working out how to subdivide the input state into an appropriate product state, and checking each behaviour independently. IMO, this is the most difficult and complicated thing about programming, so I won't say it struggled _more_ than a human would --- but humans have the advantage of being able to sleep on it? One minor thing I observed was that it tended to get really hung up on floating point edge cases (NaNs, infinities). Maybe floating point edge cases are over-represented in the property-testing training data, but it's essentially irrelevant for my usecase, at least as far as the business rules go.
> — [movpasd on hackernews](https://news.ycombinator.com/item?id=49607691)

> I thought so too but it's probably because I never review the tests. I made an exception recently and found tons of     assert(CONSTANT_CONFIG == valueOfConfig) or tests for keywords in prompts:     assert(prompt.includes("repo url"))
> — [ngruhn on hackernews](https://news.ycombinator.com/item?id=49606447)

> Amazing work! But deeply frustrating on the lack of reproducibility and how far off this is from a proper SDLC. How can I inspect exactly how agents were prompted? How can I reproduce this setup and try out my own AI setup? Am I missing a link to a repo somewhere? These evals probably match how many people are using AI, but its not the full package of how we know software development needs to be done, and not how I do it with AI. The closest would be "Audit" which scored the highest when using xhigh- that actually incorporates a review cycle- something we know is the most important part of the software development process for code correctness (design/specification is not as much of an issue in this problem since the task is to write code against an existing spec). However, we don't know what instructions they have in their "Audit". I would love to benchmark my own flow [1] if I can be given their exact problem. What it does is (assuming there is already a solid spec)   * plan with expensive model. Review the plan.   * implement with cheap model. Review for spec compliance and code quality.   * Reviews are done adversarially from the expensive model with a fresh context.   * ensure that verifications (automated or manual) are performed. For non-trivial changes, the review and verification process almost always catch significant issues. The workflow does use TDD. I do find useless tests being written and I need to dig into this part of the workflow a lot more, so its great to see that aspect of this article. My experience writing software has taught me that code must be written to be easy to test, but not necessarily done TDD style. [1] https://github.com/gregwebs/skills-sdlc/
> — [gregwebs on hackernews](https://news.ycombinator.com/item?id=49609309)

**Source threads**

- [lobsters](https://lobste.rs/s/adrda9/how_well_do_agents_use_test_verification) · 13 points · 1 comments
- [hackernews](https://news.ycombinator.com/item?id=49605246) · 21 points · 46 comments
- [hackernews](https://news.ycombinator.com/item?id=49599835) · 6 points · 1 comments

## Community discussion

Top comments from developers on daily.dev.

**@leonidbugaev** · 0 upvotes

> The four Huffman streams bit is the one that stuck. TDD agents wrote more tests and still made all four streams identical, so the jump table never got exercised. I'd have assumed more tests meant better coverage of that case.

**@kartiknvj** · 0 upvotes

> This tracks with what I see in production: telling an agent to use TDD or formal methods does not automatically improve correctness, and sometimes it makes things worse. The eval question I care about is whether the agent's test set actually covers the edge cases, not just whether the tests pass.

## Similar posts on daily.dev

- [How do programming languages impact token efficiency and correctness?](https://daily.dev/posts/how-do-programming-languages-impact-token-efficiency-and-correctness--qcueq5jh9) · Lobsters · 0 upvotes · 0 comments
- [What's the best programming language for coding agents?](https://daily.dev/posts/what-s-the-best-programming-language-for-coding-agents--0qwpo94gr) · Hacker News · 1 upvotes · 0 comments
- [Writing Rust code that's faster than state-of-the-art libraries by asking agents to make the code faster](https://daily.dev/posts/writing-rust-code-that-s-faster-than-state-of-the-art-libraries-by-asking-agents-to-make-the-code-fa-886d02uwp) · Max Woolf's Blog · 0 upvotes · 0 comments
- [Google Newsletter Issue Agent-CLI Eval](https://daily.dev/posts/google-newsletter-issue-agent-cli-eval-zbtoft45i) · Daily Dose of Data Science \| Avi Chawla \| Substack · 3 upvotes · 1 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#ai-agents](https://daily.dev/tags/ai-agents), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How well do agents use test/verification techniques?","url":"https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73"},"datePublished":"2026-09-08T04:48:27.570Z","dateModified":"2026-09-14T07:57:37.159Z","description":"An extensive empirical evaluation tests whether prompting coding agents (codex with GPT-5.6 Sol) to use specific testing techniques or libraries (TDD, formal...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"testing,ai-agents,rust","timeRequired":"PT60M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"How well do agents use test/verification techniques?"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73","comment":[{"@type":"Comment","text":"The four Huffman streams bit is the one that stuck. TDD agents wrote more tests and still made all four streams identical, so the jump table never got exercised. I’d have assumed more tests meant better coverage of that case.","datePublished":"2026-09-08T10:58:28.234Z","url":"https://daily.dev/posts/SqBqS8j73#c-6yvY4xbv0","author":{"@type":"Person","name":"Leonid Bugaev","url":"https://daily.dev/leonidbugaev","image":"https://lh3.googleusercontent.com/a/ACg8ocLhMgurwTmJElWaH9A8Ju8cHvZxgMCDt009jEYkmFCyUGAoaGSw=s96-c"}},{"@type":"Comment","text":"This tracks with what I see in production: telling an agent to use TDD or formal methods does not automatically improve correctness, and sometimes it makes things worse. The eval question I care about is whether the agent’s test set actually covers the edge cases, not just whether the tests pass.","datePublished":"2026-09-10T19:19:36.644Z","url":"https://daily.dev/posts/SqBqS8j73#c-3x9EWevUt","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-well-do-agents-use-test-verification-techniques--sqbqs8j73#faq","mainEntity":[{"@type":"Question","name":"Does telling an AI coding agent to use test-driven development improve the correctness of its implementation?","acceptedAnswer":{"@type":"Answer","text":"No, TDD instructions made results worse in a controlled Zstd implementation evaluation. Agents produced roughly twice as many tests and worked more iteratively, but wrote more tests that failed to cover hard cases, such as testing a four-stream jump table with all streams made identical. Agents had failing tests before substantial implementation in 67 of 160 runs versus 0 of 160 under default instructions, yet correctness dropped. Anyone deciding how to prompt coding agents for testing can track findings like this on daily.dev."}},{"@type":"Question","name":"Do coding agents effectively use property-based testing libraries like QuickCheck or proptest when instructed to?","acceptedAnswer":{"@type":"Answer","text":"Not very effectively. When instructed to use QuickCheck, agents mostly wrote simple smoke tests, with 63 of 160 runs checking only a single property, and leaned on fully randomized inputs that mostly hit invalid or rejection code paths rather than meaningful cases. Proptest performed somewhat better than other conditions partly because its shrinking feature occasionally found simpler failing inputs, providing some real value. Developers weighing property-based testing tools for agent-assisted workflows can follow results like these on daily.dev."}},{"@type":"Question","name":"Do formal verification tools like Verus, TLA+, or Lean 4 improve code correctness when used by AI coding agents?","acceptedAnswer":{"@type":"Answer","text":"No, formal methods did not improve correctness when agents were simply instructed to use them without expert guidance. Agents using Verus mostly proved trivial or vacuous properties unrelated to actual bugs, relied on standard Rust unit tests for real correctness, and avoided verifying the parts of the code most likely to contain bugs, such as bitstream reversal logic in a Zstd implementation. Teams deciding whether formal methods pay off with AI agents can track evaluations like this on daily.dev."}}]}
```

