A four-layer architectural approach to structuring test code is presented, centered around BDD principles. The layers consist of: test cases focused on system behavior, a DSL layer that defines the language used in those tests, and protocol drivers that translate domain language into interactions with the system under test. The approach works for both internal DSLs built on top of a programming language and external DSLs like Gherkin. The core idea is to consciously build a domain-specific language that makes writing and implementing BDD scenarios easier and more consistent.

1m watch time

Sort: