--- license: cc-by-4.0 task_categories: - text-generation language: - en tags: - code - java - test-refinement - test-evolution - software-engineering - benchmark - agents size_categories: - n<1K configs: - config_name: full default: true data_files: - split: test path: data/full.parquet - config_name: lite data_files: - split: test path: data/lite.parquet --- # TestEvo-Bench / teb-refinement A benchmark for **test refinement** in evolving Java codebases: the developer's old test already passes on the new code, and the developer edits it so that it covers more lines of the production methods it executes. The task restores the old test file; each agent-refined test must pass on the new code with a positive coverage gain over the unrefined test. This repository holds the **test refinement track** of TestEvo-Bench in two configurations: `full` (the complete track) and `lite` (the TestEvo-Bench Lite subset). Every Lite row is byte-identical to its Full row; Lite only selects tasks. ## Links - 🌐 Project website, data explorer and leaderboard: https://www.testevo-bench.com/ - 📦 Evaluation framework (agent and evaluator Docker images, runner): https://anonymous.4open.science/r/testevo-bench-1150 - 🤝 Sibling datasets (the other two tracks): - [`TestEvo-Bench/teb-update`](https://huggingface.co/datasets/TestEvo-Bench/teb-update) — test update track - [`TestEvo-Bench/teb-generation`](https://huggingface.co/datasets/TestEvo-Bench/teb-generation) — test generation track ## Dataset summary Every task was mined from a real pair of revisions (`rev1` → `rev2`) of a public Java project built with Maven, and validated by executing the developer's old and new tests on both revisions. A **task** is one (repository, revision pair, test file) group and is the unit an agent works on: it receives the two-revision repository, the test file, class, module and method names, and the build and test commands, and may edit only the target test file. A task succeeds when every target test method meets the track criterion. A **test method** is one entry of the task's `test_changes` list. | | `full` | `lite` | |---|---|---| | Tasks (rows) | 216 | 84 | | Test methods | 408 | 95 | | Source repositories | 50 | 32 | | Java versions | 8, 11, 17, 21 | 8, 11, 17, 21 | | Revision dates (`date`) | 2019-01-12 – 2026-06-26 | 2019-02-24 – 2026-06-26 | | Build system | Maven | Maven | Across the three tracks, Full has 3,020 tasks (641 update, 2,163 generation, 216 refinement; 7,807 test methods) from 196 repositories, and Lite has 584 tasks (200 update, 300 generation, 84 refinement; 805 test methods) from 138 repositories. ### The Lite subset TestEvo-Bench Lite lowers the cost of evaluating an agent. It is built by five deterministic rules that remove (1) toy or tutorial repositories; (2) records whose developer test covers none of the changed code; (3) records not collected from adjacent commits; (4) potentially flaky tests (time, randomness, network or environment dependent, or disabled); and (5) tasks with more than three target methods. Update and generation tasks are then sampled by year with per-repository caps (budgets of 200 and 300 tasks); all remaining refinement tasks are kept. Lite therefore favors tractable, measurable tasks rather than being a random sample of Full. ## Schema Top-level fields (one row per task): | Field | Type | Description | |---|---|---| | `task_id` | string | Stable identifier: `______` | | `project_name` | string | `_-`, the upstream repository and the release it was mined from, e.g. `DerekYRC_mini-spring-main` | | `git_clone_url` | string | Upstream GitHub clone URL | | `rev1`, `rev2` | string | Full git SHAs of the old and new revision | | `date` | string | Commit date of `rev2`, the new revision, ISO 8601 UTC | | `test_file` | string | Path of the target test file within the repository | | `test_changes` | list<struct> | The target test methods, each a `@Test` method that the developer refined between `rev1` and `rev2`; see below | | `java_version` | int | Java major version (8, 9, 11, 17, 18 or 21) verified to build and run the developer tests on both revisions | Each `test_changes[]` element: | Field | Type | Description | |---|---|---| | `change_id` | string | Unique id within the track | | `test_sign` | string | JVM-style signature of the test method | | `class`, `method`, `module` | string | Test class, method name, Maven module | | `junit_selector` | string | JUnit selector usable with `mvn test -Dtest=…` | | `old_test_code` | string \| null | The test method's source at `rev1` (always present) | | `new_test_code` | string | The developer's test method at `rev2` (the reference solution) | | `old_test_lnum`, `new_test_lnum` | list<string> | Line ranges of the test method at each revision | | `old_test_file_path` | list<string> | Where the test file lived at `rev1` | | `all_deps_new` | list<string> | The production methods the developer's new test executes on the new revision (its dependency methods). Their executable lines are the scope of the coverage and mutation metrics | | `variant_result` | struct | Developer-test outcome matrix: `old_on_old`, `old_on_new`, `new_on_old`, `new_on_new`. The track criterion is defined on this matrix | | `coverage_gold` | float | Line coverage of the developer's new test over its dependency methods on the new revision | | `coverage_delta_gold` | float | Coverage gain of the developer's refined test over the unrefined test, as a fraction of the executable lines of its dependency methods on the new revision | | `coverage_gain` | struct | The gain in detail: `denominator` (executable lines of the dependency methods), `baseline_covered` (lines the unrefined test covers), `developer_covered` (lines the refined test covers), `gained`, `lost`, `net`, `gain`, `status`, `version` | ## How to load ```python from datasets import load_dataset full = load_dataset("TestEvo-Bench/teb-refinement", "full", split="test") # default config lite = load_dataset("TestEvo-Bench/teb-refinement", "lite", split="test") print(len(full), len(lite), full.column_names) for task in lite: for tc in task["test_changes"]: print(task["task_id"], tc["junit_selector"], len(tc["all_deps_new"])) ``` The files are Parquet (`data/full.parquet`, `data/lite.parquet`) and can also be read directly with pandas or pyarrow. ## Running agents The dataset carries the task definitions and the developer's reference tests. Agent evaluation (building the two revisions, running the tests on old and new code, coverage and mutation scoring) is done by the evaluation framework linked above, which consumes the same task records inside Docker images with JDK 8/11/17/21 and Maven and offline dependency stores. `new_test_code` is the developer's solution: leaderboard submissions must not expose it to the agent. ## Source projects and attribution The code snippets in `old_test_code` and `new_test_code` come from public Java repositories on GitHub. Each row's `git_clone_url`, `rev1` and `rev2` identify the upstream project and revisions, whose own license governs reuse of those snippets. The dataset structure and metadata are released under CC BY 4.0; please cite TestEvo-Bench (see the website) when using it. ## Version history - **2026-10** — Full and Lite configurations; three tracks (update, generation, refinement); task set of the TestEvo-Bench paper (Full 3,020 / Lite 584 tasks). Rows are grouped by (repository, revision pair, test file); `rev2_date` is renamed `date` and `rev1_date` is dropped; `java_version` now holds the JDK verified to build the task's own revisions rather than the project's declared version; `version` and `git_diff_url` are dropped (derivable from `project_name`, `git_clone_url`, `rev1`, `rev2`); the focal-method and retrieval fields of the first release (`focal_*`, `old_production_code`, `new_production_code`, `deps_changes`, `all_deps_old`) are dropped because the agent benchmark does not use them. - **2026-05** — Initial release: update (509 tasks) and generation (746 tasks) tracks only, `data/train.jsonl`. ## License - **Dataset structure and metadata:** CC BY 4.0 - **Embedded code snippets:** governed by each upstream repository's own license (see `git_clone_url` per row).