title: Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code
    Generation
summary: We introduce WebApp1K, a novel benchmark for evaluating large language models
  (LLMs) in test-driven development (TDD) tasks, where test cases serve as both
  prompt and verification for code generation. Unlike traditional approaches
  relying on natural language prompts, our benchmark emphasizes the ability of
  LLMs to interpret and implement functionality directly from test cases,
  reflecting real-world software development practices. Comprising 1000 diverse
  challenges across 20 application domains, the benchmark evaluates LLMs on their
  ability to generate compact, functional code under the constraints of context
  length and multi-feature complexity. Our findings highlight instruction
  following and in-context learning as critical capabilities for TDD success,
  surpassing the importance of general coding proficiency or pretraining
  knowledge. Through comprehensive evaluation of 19 frontier models, we reveal
  performance bottlenecks, such as instruction loss in long prompts, and provide
  a detailed error analysis spanning multiple root causes. This work underscores
  the practical value of TDD-specific benchmarks and lays the foundation for
  advancing LLM capabilities in rigorous, application-driven coding scenarios.
paper_authors._id: 6825421166de88551db7dab6
paper_authors.name: Yi Cui
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-05-16T07:12:40.250Z
paper_authors._id: 669dbd709a4bf63e08f1ddc2
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/669dbd709a4bf63e08f1ddc2/aV10ZJPPzH5LbnHFZNqc7.png
paper_authors.fullname: Yi Cui
paper_authors.type: user
paper_authors.user: onekq
paper_title: Tests as Prompt: A Test-Driven-Development Benchmark for LLM Code
    Generation
paper_summary: We introduce WebApp1K, a novel benchmark for evaluating large language models
  (LLMs) in test-driven development (TDD) tasks, where test cases serve as both
  prompt and verification for code generation. Unlike traditional approaches
  relying on natural language prompts, our benchmark emphasizes the ability of
  LLMs to interpret and implement functionality directly from test cases,
  reflecting real-world software development practices. Comprising 1000 diverse
  challenges across 20 application domains, the benchmark evaluates LLMs on their
  ability to generate compact, functional code under the constraints of context
  length and multi-feature complexity. Our findings highlight instruction
  following and in-context learning as critical capabilities for TDD success,
  surpassing the importance of general coding proficiency or pretraining
  knowledge. Through comprehensive evaluation of 19 frontier models, we reveal
  performance bottlenecks, such as instruction loss in long prompts, and provide
  a detailed error analysis spanning multiple root causes. This work underscores
  the practical value of TDD-specific benchmarks and lays the foundation for
  advancing LLM capabilities in rigorous, application-driven coding scenarios.
paper_ai_summary: A new benchmark evaluates large language models in test-driven development tasks using test cases as prompts, emphasizing functionality interpretation and in-context learning.
paper_ai_keywords: large language models LLMs test-driven development TDD test cases prompt verification code generation context length multi-feature complexity instruction following in-context learning general coding proficiency pretraining knowledge instruction loss