Gherkin features and guidance
Table of Contents
The Gherkin language is used to define test cases for the Cucumber testing tool for behavior-driven development. The Gherkin syntax is designed to be non-technical, making it human-readable for a wide audience.
<summary>Language Info for Gherkin</summary>
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">Since PMD 6.48.0</li>
<li class="list-group-item">Implementation: <a href="https://docs.pmd-code.org/apidocs/pmd-gherkin/7.0.0-SNAPSHOT/net/sourceforge/pmd/lang/gherkin/GherkinLanguageModule.html#"><code>GherkinLanguageModule</code></a></li>
<li class="list-group-item">Id: gherkin</li>
<li class="list-group-item">PMD: ❌</li>
<li class="list-group-item">CPD: ✔️</li>
</ul>
</div>
Support in PMD
Starting from version 6.48.0, Gherkin support was added to CPD.
Limitations
- Support for Gherkin only extends to CPD to detect code duplication in Cucumber test cases.
- While Gherkin keywords have been translated into various languages, CPD currently supports only the English version of the Gherkin language.