Generate a JUnit 5 replay test from recorded cases
migrate_replayGenerate a JUnit 5 ReplayTest that replays recorded JSONL cases against a Java port, checking method outputs, JS-only sentinels, and thrown errors.
Instructions
Generate a JUnit 5 test (ReplayTest) that replays the JSONL cases recorded by migrate_record against the Java port class: invokes each ported method with the recorded arguments and compares values, including JS-only sentinels (undefined, -0, NaN, Infinity, bigint) and throws. Running 'mvn test' on the generated project is the replay. Inspiration: rust-anything (MIT).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "migrate_replay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cases | No | Path to the .jsonl cases file recorded by migrate_record | |
| class | No | Java port class: simple name (with 'package') or fully-qualified | |
| output | No | Explicit .java file path for the test (must end with .java) | |
| package | No | Package for the generated test (default: derived from 'class', else com.migrated) | |
| project | No | Generated Maven project root; the test is written to src/test/java/<package>/ (default: next to the cases file) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| success | Yes |