Skip to content

Commit 12c288f

Browse files
Copilotrdmueller
andcommitted
feat: Add Gherkin semantic anchor (#issue)
Co-authored-by: rdmueller <1856308+rdmueller@users.noreply.github.com>
1 parent ffa4c33 commit 12c288f

7 files changed

Lines changed: 299 additions & 8 deletions

File tree

docs/anchors/gherkin.adoc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
= Gherkin
2+
:categories: testing-quality
3+
:roles: software-developer, qa-engineer, business-analyst, product-owner
4+
:related: bdd-given-when-then, ears-requirements, tdd-london-school
5+
:proponents: Aslak Hellesøy
6+
:tags: gherkin, bdd, cucumber, given-when-then, specification-by-example, dsl, acceptance-testing, living-documentation
7+
8+
[%collapsible]
9+
====
10+
Also known as:: Cucumber DSL, BDD Scenario Language
11+
12+
[discrete]
13+
== *Core Concepts*:
14+
15+
Feature:: Top-level description of a software capability, grouping related scenarios that describe expected behavior
16+
17+
Scenario:: A concrete example of how the system should behave in a specific situation, written as a sequence of steps
18+
19+
Given-When-Then steps:: Structured step types — Given establishes preconditions, When describes an action, Then asserts the expected outcome; And/But extend any step type
20+
21+
Background:: A set of steps shared across all scenarios in a feature file, executed before each scenario
22+
23+
Scenario Outline / Examples:: Parameterized scenario template with a data table, allowing the same behavior to be tested with multiple input sets
24+
25+
Docstrings and Data Tables:: Inline multi-line strings and tabular data attached to steps for richer input specification
26+
27+
Natural language support:: Gherkin keywords are translated into 70+ human languages, enabling non-English teams to write scenarios in their native language
28+
29+
Human-readable and machine-executable:: Scenarios serve as both documentation for stakeholders and executable tests driven by step definitions in the implementation language
30+
31+
Key Proponent:: Aslak Hellesøy (creator of Cucumber and the Gherkin language, 2008); influenced by Dan North's BDD and JBehave
32+
33+
[discrete]
34+
== *When to Use*:
35+
36+
* Defining acceptance criteria collaboratively between developers, testers, and business stakeholders
37+
* Creating living documentation that stays synchronized with the system's behavior
38+
* Writing automated acceptance tests that non-technical stakeholders can read and verify
39+
* Projects adopting Behavior-Driven Development (BDD) with tools like Cucumber, SpecFlow, or Behave
40+
41+
[discrete]
42+
== *Related Anchors*:
43+
44+
* <<bdd-given-when-then,BDD (Behavior-Driven Development)>> - The practice that Gherkin was designed to support
45+
* <<ears-requirements,EARS Requirements>> - Alternative structured natural-language requirements format
46+
* <<tdd-london-school,TDD, London School>> - Outside-in development that naturally combines with Gherkin-driven acceptance tests
47+
====

docs/anchors/gherkin.de.adoc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
= Gherkin
2+
:categories: testing-quality
3+
:roles: software-developer, qa-engineer, business-analyst, product-owner
4+
:related: bdd-given-when-then, ears-requirements, tdd-london-school
5+
:proponents: Aslak Hellesøy
6+
:tags: gherkin, bdd, cucumber, given-when-then, specification-by-example, dsl, acceptance-testing, living-documentation
7+
8+
[%collapsible]
9+
====
10+
Auch bekannt als:: Cucumber DSL, BDD-Szenariosprache
11+
12+
[discrete]
13+
== *Kernkonzepte*:
14+
15+
Feature:: Übergeordnete Beschreibung einer Softwarefähigkeit, die verwandte Szenarien zu erwartetem Verhalten gruppiert
16+
17+
Scenario:: Ein konkretes Beispiel, wie das System in einer bestimmten Situation reagieren soll, beschrieben als eine Abfolge von Schritten
18+
19+
Given-When-Then-Schritte:: Strukturierte Schritttypen — Given legt Vorbedingungen fest, When beschreibt eine Aktion, Then prüft das erwartete Ergebnis; And/But erweitern jeden Schritttyp
20+
21+
Background:: Eine Menge von Schritten, die allen Szenarien einer Feature-Datei gemeinsam sind und vor jedem Szenario ausgeführt werden
22+
23+
Scenario Outline / Examples:: Parametrisierte Szenariovorlage mit einer Datentabelle, die es ermöglicht, dasselbe Verhalten mit verschiedenen Eingabewerten zu testen
24+
25+
Docstrings und Data Tables:: Eingebettete mehrzeilige Zeichenketten und Tabellendaten, die Schritten für reichhaltigere Eingabespezifikationen beigefügt werden
26+
27+
Mehrsprachigkeit:: Gherkin-Schlüsselwörter sind in über 70 Sprachen übersetzt, sodass nicht-englischsprachige Teams Szenarien in ihrer Muttersprache schreiben können
28+
29+
Menschenlesbar und maschinenausführbar:: Szenarien dienen gleichzeitig als Dokumentation für Stakeholder und als ausführbare Tests, die durch Schrittdefinitionen in der Implementierungssprache angetrieben werden
30+
31+
Schlüsselvertreter:: Aslak Hellesøy (Schöpfer von Cucumber und der Gherkin-Sprache, 2008); beeinflusst von Dan Norths BDD und JBehave
32+
33+
[discrete]
34+
== *Wann zu verwenden*:
35+
36+
* Akzeptanzkriterien kollaborativ zwischen Entwicklern, Testern und fachlichen Stakeholdern definieren
37+
* Lebendige Dokumentation erstellen, die mit dem Systemverhalten synchron bleibt
38+
* Automatisierte Akzeptanztests schreiben, die nicht-technische Stakeholder lesen und prüfen können
39+
* Projekte, die Behavior-Driven Development (BDD) mit Tools wie Cucumber, SpecFlow oder Behave einsetzen
40+
41+
[discrete]
42+
== *Verwandte Anker*:
43+
44+
* <<bdd-given-when-then,BDD (Behavior-Driven Development)>> - Die Praxis, für die Gherkin entwickelt wurde
45+
* <<ears-requirements,EARS Requirements>> - Alternatives Format für strukturierte natürlichsprachige Anforderungen
46+
* <<tdd-london-school,TDD, London School>> - Outside-in-Entwicklung, die sich natürlich mit Gherkin-getriebenen Akzeptanztests verbindet
47+
====

skill/semantic-anchor-translator/references/catalog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ Source: https://github.com/LLM-Coding/Semantic-Anchors
1919
- **Proponents:** Dan North
2020
- **Core:** Given-When-Then scenarios, Gherkin syntax, three amigos, living documentation, outside-in specification
2121

22+
### Gherkin
23+
- **Also known as:** Cucumber DSL, BDD Scenario Language
24+
- **Proponents:** Aslak Hellesøy
25+
- **Core:** Domain-specific language for writing human-readable executable specifications; Feature/Scenario/Given/When/Then keywords; Background, Scenario Outline, Examples; 70+ natural languages; used by Cucumber, SpecFlow, Behave
26+
2227
### Test Double (Meszaros)
2328
- **Proponents:** Gerard Meszaros
2429
- **Core:** Taxonomy of test substitutes — Dummy (unused), Stub (canned responses), Spy (records calls), Mock (verifies interactions), Fake (simplified implementation)

website/public/data/anchors.json

Lines changed: 175 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,38 @@
491491
],
492492
"filePath": "docs/anchors/fowler-patterns.adoc"
493493
},
494+
{
495+
"id": "gherkin",
496+
"title": "Gherkin",
497+
"categories": [
498+
"testing-quality"
499+
],
500+
"roles": [
501+
"software-developer",
502+
"qa-engineer",
503+
"business-analyst",
504+
"product-owner"
505+
],
506+
"related": [
507+
"bdd-given-when-then",
508+
"ears-requirements",
509+
"tdd-london-school"
510+
],
511+
"proponents": [
512+
"Aslak Hellesøy"
513+
],
514+
"tags": [
515+
"gherkin",
516+
"bdd",
517+
"cucumber",
518+
"given-when-then",
519+
"specification-by-example",
520+
"dsl",
521+
"acceptance-testing",
522+
"living-documentation"
523+
],
524+
"filePath": "docs/anchors/gherkin.adoc"
525+
},
494526
{
495527
"id": "gof-abstract-factory-pattern",
496528
"title": "GoF-Abstract Factory Pattern",
@@ -1737,6 +1769,105 @@
17371769
"tags": [],
17381770
"filePath": "docs/anchors/socratic-method.adoc"
17391771
},
1772+
{
1773+
"id": "solid-dip",
1774+
"title": "SOLID-Dependency Inversion Principle",
1775+
"categories": [
1776+
"design-principles"
1777+
],
1778+
"roles": [
1779+
"software-developer",
1780+
"software-architect"
1781+
],
1782+
"related": [],
1783+
"proponents": [
1784+
"Robert C. Martin"
1785+
],
1786+
"tags": [
1787+
"SOLID",
1788+
"design principle",
1789+
"DIP",
1790+
"dependency inversion"
1791+
],
1792+
"filePath": "docs/anchors/solid-dip.adoc",
1793+
"umbrella": "solid-principles",
1794+
"tier": 1
1795+
},
1796+
{
1797+
"id": "solid-isp",
1798+
"title": "SOLID-Interface Segregation Principle",
1799+
"categories": [
1800+
"design-principles"
1801+
],
1802+
"roles": [
1803+
"software-developer",
1804+
"software-architect"
1805+
],
1806+
"related": [],
1807+
"proponents": [
1808+
"Robert C. Martin"
1809+
],
1810+
"tags": [
1811+
"SOLID",
1812+
"design principle",
1813+
"ISP",
1814+
"interface segregation"
1815+
],
1816+
"filePath": "docs/anchors/solid-isp.adoc",
1817+
"umbrella": "solid-principles",
1818+
"tier": 1
1819+
},
1820+
{
1821+
"id": "solid-lsp",
1822+
"title": "SOLID-Liskov Substitution Principle",
1823+
"categories": [
1824+
"design-principles"
1825+
],
1826+
"roles": [
1827+
"software-developer",
1828+
"software-architect"
1829+
],
1830+
"related": [],
1831+
"proponents": [
1832+
"Robert C. Martin",
1833+
"Barbara Liskov"
1834+
],
1835+
"tags": [
1836+
"SOLID",
1837+
"design principle",
1838+
"LSP",
1839+
"liskov",
1840+
"substitution"
1841+
],
1842+
"filePath": "docs/anchors/solid-lsp.adoc",
1843+
"umbrella": "solid-principles",
1844+
"tier": 1
1845+
},
1846+
{
1847+
"id": "solid-ocp",
1848+
"title": "SOLID-Open/Closed Principle",
1849+
"categories": [
1850+
"design-principles"
1851+
],
1852+
"roles": [
1853+
"software-developer",
1854+
"software-architect"
1855+
],
1856+
"related": [],
1857+
"proponents": [
1858+
"Robert C. Martin",
1859+
"Bertrand Meyer"
1860+
],
1861+
"tags": [
1862+
"SOLID",
1863+
"design principle",
1864+
"OCP",
1865+
"open closed"
1866+
],
1867+
"filePath": "docs/anchors/solid-ocp.adoc",
1868+
"umbrella": "solid-principles",
1869+
"tier": 1
1870+
},
17401871
{
17411872
"id": "solid-principles",
17421873
"title": "SOLID Principles",
@@ -1749,10 +1880,51 @@
17491880
"educator",
17501881
"consultant"
17511882
],
1883+
"related": [
1884+
"gof-design-patterns",
1885+
"clean-architecture"
1886+
],
1887+
"proponents": [
1888+
"Robert C. Martin"
1889+
],
1890+
"tags": [
1891+
"design-principles",
1892+
"oop",
1893+
"solid",
1894+
"uncle-bob"
1895+
],
1896+
"filePath": "docs/anchors/solid-principles.adoc",
1897+
"subAnchors": [
1898+
"solid-srp",
1899+
"solid-ocp",
1900+
"solid-lsp",
1901+
"solid-isp",
1902+
"solid-dip"
1903+
]
1904+
},
1905+
{
1906+
"id": "solid-srp",
1907+
"title": "SOLID-Single Responsibility Principle",
1908+
"categories": [
1909+
"design-principles"
1910+
],
1911+
"roles": [
1912+
"software-developer",
1913+
"software-architect"
1914+
],
17521915
"related": [],
1753-
"proponents": [],
1754-
"tags": [],
1755-
"filePath": "docs/anchors/solid-principles.adoc"
1916+
"proponents": [
1917+
"Robert C. Martin"
1918+
],
1919+
"tags": [
1920+
"SOLID",
1921+
"design principle",
1922+
"SRP",
1923+
"single responsibility"
1924+
],
1925+
"filePath": "docs/anchors/solid-srp.adoc",
1926+
"umbrella": "solid-principles",
1927+
"tier": 1
17561928
},
17571929
{
17581930
"id": "sota",

website/public/data/categories.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040
"gof-strategy-pattern",
4141
"gof-template-method-pattern",
4242
"gof-visitor-pattern",
43+
"solid-dip",
44+
"solid-isp",
45+
"solid-lsp",
46+
"solid-ocp",
4347
"solid-principles",
48+
"solid-srp",
4449
"spot-principle",
4550
"ssot-principle",
4651
"yagni"
@@ -147,6 +152,7 @@
147152
"name": "Testing & Quality Practices",
148153
"anchors": [
149154
"bdd-given-when-then",
155+
"gherkin",
150156
"iec-61508-sil-levels",
151157
"mutation-testing",
152158
"owasp-top-10",

website/public/data/metadata.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"generatedAt": "2026-03-09T14:10:44.809Z",
2+
"generatedAt": "2026-03-11T11:07:32.371Z",
33
"version": "1.0.0",
44
"counts": {
5-
"anchors": 85,
5+
"anchors": 92,
66
"categories": 12,
77
"roles": 12
88
},
99
"statistics": {
10-
"averageRolesPerAnchor": "2.96",
10+
"averageRolesPerAnchor": "2.95",
1111
"averageCategoriesPerAnchor": "1.00",
12-
"anchorsWithTags": 40,
13-
"anchorsWithRelated": 16
12+
"anchorsWithTags": 48,
13+
"anchorsWithRelated": 18
1414
}
1515
}

0 commit comments

Comments
 (0)