← Latest papers
💻 computer science

TestMap: Evidence Infrastructure for Foundation-Model-Assisted Test Generation

This paper introduces TestMap, an open-source infrastructure for C#/.NET that automates the end-to-end lifecycle of foundation-model-assisted test generation by integrating diverse validation tools to systematically track, measure, and compare the evidence quality of generated tests across various models and strategies.

Original authors: Hunter Leary, Luke Hanuska, Chris Brown

Published 2026-06-10
📖 5 min read🧠 Deep dive

Original authors: Hunter Leary, Luke Hanuska, Chris Brown

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a chef who has hired a very talented, but sometimes overconfident, robot assistant to help you write new recipes for your restaurant. The robot can whip up hundreds of recipe drafts in seconds. But here's the problem: just because the robot wrote a recipe doesn't mean it's edible, safe, or even useful for your specific kitchen. Some might be missing ingredients, others might taste terrible, and some might even be dangerous if followed blindly.

This is exactly the situation software developers face with Foundation Models (FMs)—the powerful AI tools that can write code and tests. The paper introduces TestMap, a tool designed to solve the "trust issue" with AI-generated tests.

Here is a breakdown of what the paper says, using simple analogies:

1. The Problem: The "Black Box" of AI Testing

When an AI writes a test (a small program that checks if your software works), it's like the robot chef handing you a stack of recipe cards.

  • The Old Way: Developers would just look at the cards that said "Success!" and throw away the rest. They didn't know why the others failed. Was the recipe bad? Did the robot misunderstand the ingredients? Was the kitchen (the computer environment) just broken?
  • The Risk: If you only keep the "success" cards, you might miss the fact that the robot is actually writing recipes that confirm your food is burnt, rather than telling you it's undercooked. You need to know the whole story of every recipe the robot tried to write, not just the winners.

2. The Solution: TestMap (The "Recipe Detective")

TestMap is an open-source tool (currently built for C#/.NET software) that acts like a super-detailed detective for these AI-generated tests. Instead of just saying "Pass" or "Fail," it records the entire lifecycle of every single test the AI tries to create.

Think of TestMap as a lab notebook that tracks every step of the robot's cooking process:

  • The Ingredients: It records exactly what the robot was told (the prompt) and what context it had (the existing code).
  • The Attempt: It tries to "cook" the test (compile and run it).
  • The Mistakes: If the test fails, TestMap doesn't delete it. It saves the error message, the failed attempt, and the reason it broke. This is crucial because a failure might reveal a bug in your actual software, not just a mistake by the robot.
  • The Repair: If the test fails, TestMap can ask the robot to try again with the error message as a hint. It tracks how many tries it took to fix it.
  • The Taste Test: It runs the new test against your existing menu to see if it actually finds new problems (like finding a burnt cookie that the old tests missed) or if it just repeats what you already knew.

3. How It Works: The "Evidence Pipeline"

The paper describes TestMap as an infrastructure that automates a specific workflow:

  1. Ingestion: It grabs a real software project (a "repository") and maps out all its files, like a librarian organizing a library.
  2. The Baseline: Before the AI does anything, TestMap runs the existing tests to see how the software behaves normally. This is like tasting the dish before the robot adds a new ingredient.
  3. Generation: The AI is asked to write a test for a specific part of the code.
  4. Validation: TestMap tries to build and run the new test.
    • Did it compile? (Is the grammar correct?)
    • Did it pass? (Does it run without crashing?)
    • Did it catch a bug? (Did it find something new?)
  5. Evidence Collection: This is the core innovation. TestMap saves everything:
    • The code that failed.
    • The code that was repaired.
    • The code that passed but didn't find anything new (low impact).
    • The code that passed and found a real bug (evidence-positive).

4. Why "Failed" Tests Matter

The paper emphasizes that failed tests are valuable evidence.

  • If a test fails to compile, it might mean the AI didn't understand the project's rules.
  • If a test fails because of an error in the code, it might mean the AI found a real bug in your software that you didn't know about.
  • If a test passes but is "flaky" (works sometimes, fails others), it tells you the test is unreliable.

By keeping these "failed" candidates, TestMap helps developers understand the limitations of the AI. It stops the "survivorship bias" where we only see the AI's best moments and ignore its struggles.

5. The Goal: Better Decisions, Not Just More Code

TestMap isn't trying to replace developers. It's trying to give them a dashboard of evidence.

  • Instead of asking, "Did the AI write a test?"
  • TestMap asks, "Did the AI write a test that is useful, maintainable, and trustworthy for this specific project?"

It allows researchers and developers to compare different AI models or different ways of asking the AI questions (prompts) to see which one actually produces the best results for a specific codebase, rather than just relying on generic benchmarks.

Summary

In short, TestMap is a tool that treats AI-generated tests not as finished products, but as candidates that need to be investigated. It builds a complete history for every candidate—tracking their failures, repairs, and successes—so that developers can make informed decisions about whether to trust and use the AI's work. It turns the "black box" of AI testing into a transparent, evidence-based process.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →