license: cc-by-4.0
task_categories:
- text-generation
language:
- en
tags:
- code
- java
- test-update
- test-evolution
- software-engineering
- benchmark
size_categories:
- n<1K
configs:
- config_name: default
data_files: data/train.jsonl
TestEvo-Bench / teb-update
A benchmark for test-update in evolving Java codebases. Each row captures a single (project, revision-pair) where one or more existing tests were modified to track a change in production code, and surfaces both the old and new test versions plus the relevant production-side context.
Links
- π Project website: https://www.testevo-bench.com/
- π¦ Code repository: https://anonymous.4open.science/r/testevo-bench-1150
- π€ Sibling dataset:
TestEvo-Bench/teb-generationβ for test-generation (writing new tests instead of updating existing ones)
Dataset summary
teb-update is a benchmark for updating existing test methods to track changes in the production code they exercise. Every example was mined from a real commit (rev1 β rev2) on a public Java project, and the test edit reflects an adaptation to a behavior- or signature-level change in the focal production method rather than purely cosmetic refactoring.
Each row corresponds to a single (project, rev1 β rev2) pair. Inside the row, test_changes is a list of one or more individual test methods that were modified in that commit, each paired with its focal production method, the production-side before/after, candidate dependency methods, and the dependencies that changed in the same commit.
| Tasks (rows) | 509 |
| Test methods | 1,138 |
| Source projects | 59 distinct Java repositories on GitHub |
| Java versions | 8, 11, 17, 21 |
| Build system | Maven |
| Total size | ~9 MB |
A task is one (project, rev1 β rev2) pair β the unit a model is asked to operate on. A test method is one entry inside that task's test_changes list β a single @Test method that was modified between rev1 and rev2. One task may contain several related test edits committed together; benchmarks can be reported at either granularity.
Schema
Each row has the following top-level fields:
| Field | Type | Description |
|---|---|---|
task_id |
string | Stable identifier: <project>__<rev1_short>_<rev2_short>__<test_class>_<hash> |
project_name |
string | e.g. DerekYRC_mini-spring-main |
git_clone_url |
string | Upstream GitHub clone URL |
rev1 |
string | Git SHA before the change (full 40-char) |
rev2 |
string | Git SHA after the change |
rev1_date |
string | ISO 8601 (e.g. 2020-12-06T08:42:43Z) |
rev2_date |
string | ISO 8601 |
git_diff_url |
string | GitHub compare URL between rev1 and rev2 |
test_file |
string | Path of the test file within the repo |
test_changes |
list<struct> | One element per individual test method that was modified; see below |
version |
string | Upstream tag or branch (e.g. v0.1.0, master) |
java_version |
int | Java major version (8, 11, 17, or 21) |
Each test_changes[] element contains:
| Field | Type | Description |
|---|---|---|
change_id |
string | Unique id within the dataset |
test_sign |
string | JVM-style test method signature |
class, method, module |
string | Test class, method name, Maven module |
junit_selector |
string | JUnit selector usable by mvn test -Dtest=β¦ |
old_test_code |
string | The test method's source at rev1 (always present for teb-update since rows are modifications) |
new_test_code |
string | The test method's source at rev2 |
old_test_lnum, new_test_lnum |
list<string> | Line ranges of the test method at each rev |
old_test_file_path |
list<string> | Where the test file lived at rev1 |
old_production_code, new_production_code |
string | Source of the focal production method at each rev |
focal_file_path |
string | Path of the focal production file |
focal_method_sign |
string | JVM-style signature of the focal production method |
focal_all_deps_scored |
list<struct> | All candidate dependency methods, each with a relevance score (nc, lcs_u, ed, class, tfidf signal sub-scores combined into score) |
deps_changes |
list<struct> | Production-code dependencies that changed between rev1 and rev2 |
How to load
from datasets import load_dataset
ds = load_dataset("TestEvo-Bench/teb-update", split="train")
print(len(ds), ds.column_names)
# Iterate over individual test edits (the unit of evaluation)
for row in ds:
for tc in row["test_changes"]:
before = tc["old_test_code"]
after = tc["new_test_code"]
focal = tc["focal_method_sign"]
...
Source projects + attribution
The code snippets in old_test_code, new_test_code, old_production_code, and new_production_code are derived from public Java repositories on GitHub. Each row's git_clone_url and git_diff_url link back to the upstream project; the upstream repository's own license governs reuse of those code snippets. The dataset structure and metadata are released under CC-BY-4.0 β please cite the project (see below) when using this benchmark.
Intended uses
Evaluating LLMs and program-synthesis systems on the task of editing an existing test method to track a production-code change, given (a) the original test, (b) the production-code diff, and (c) candidate focal-method dependencies. The included focal_all_deps_scored signals support both retrieval-augmented and end-to-end setups.
License
- Dataset structure and metadata: CC-BY-4.0
- Embedded code snippets: governed by each upstream repository's own license. See
git_clone_urlper row.