# Using Gherkin to Document Behavioral Equivalence in RPG Migrations

DevFeed: [Using Gherkin to Document Behavioral Equivalence in RPG Migrations](<https://devfeed.tech/articles/why-gherkin-is-the-right-testing-tool-for-rpg-migration-and-it-has-nothing-to-do-with-bdd-20746.md>)

Original publisher: [Read original article](<https://tomassetti.me/gherkin-rpg-migration-testing/>)

Author: Federico Tomassetti

Published: 2026-07-14T06:24:03Z

Content type: article

Language: en

Sources: [Federico Tomassetti](<https://devfeed.tech/sources/federico-tomassetti.md>)

Topics: [migration](<https://devfeed.tech/topics/migration.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Mainframe](<https://devfeed.tech/topics/mainframe.md>)

Tags: [legacy-modernization](<https://devfeed.tech/tags/legacy-modernization.md>), [mainframe](<https://devfeed.tech/tags/mainframe.md>), [migration](<https://devfeed.tech/tags/migration.md>), [rpg](<https://devfeed.tech/tags/rpg.md>), [specifications](<https://devfeed.tech/tags/specifications.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

The article argues that Gherkin can make RPG migration testing auditable to business stakeholders by expressing undocumented business rules in a readable form. It presents behavioral equivalence and stakeholder sign-off as more important migration outcomes than test coverage alone.

## Source excerpt

Everyone benchmarks RPG migration test suites on coverage. That's the wrong metric -- the real deliverable is behavioral equivalence a non-programmer will sign off on, and Gherkin is the only format the people who actually know the rules can read. The post Why Gherkin Is the Right Testing Tool for RPG Migration -- And It Has Nothing to Do With BDD appeared first on Federico Tomassetti.